Part Number Hot Search : 
04C14 B3834 P4KE24A IPP80N04 74AUP2 P4KE24A AEP378SI KBPC351
Product Description
Full Text Search
 

To Download M34513M2-XXXFP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  description the 4513/4514 group is a 4-bit single-chip microcomputer de- signed with cmos technology. its cpu is that of the 4500 series using a simple, high-speed instruction set. the computer is equipped with serial i/o, four 8-bit timers (each timer has a reload register), and 10-bit a-d converter. the various microcomputers in the 4513/4514 group include varia- tions of the built-in memory type and package as shown in the table below. features l minimum instruction execution time ................................ 0.75 m s (at 4.0 mhz oscillation frequency, in high-speed mode, v dd = 4.0 v to 5.5 v) l supply voltage ? middle-speed mode ...... 2.5 v to 5.5 v (at 4.2 mhz oscillation frequency, for mask rom version and one time prom version) ...... 2.0 v to 5.5 v (at 3.0 mhz oscillation frequency, for mask rom version) (operation voltage of a-d conversion: 2.7 v to 5.5 v) ? high-speed mode ...... 4.0 v to 5.5 v (at 4.2 mhz oscillation frequency, for mask rom version and one time prom version) ...... 2.5 v to 5.5 v (at 2.0 mhz oscillation frequency, for mask rom version and one time prom version) ...... 2.0 v to 5.5 v (at 1.5 mhz oscillation frequency, for mask rom version) (operation voltage of a-d conversion: 2.7 v to 5.5 v) l timers timer 1 ...................................... 8-bit timer with a reload register timer 2 ...................................... 8-bit timer with a reload register timer 3 ...................................... 8-bit timer with a reload register timer 4 ...................................... 8-bit timer with a reload register l interrupt ........................................................................ 8 sources l serial i/o ....................................................................... 8 bit-wide l a-d converter .................. 10-bit successive comparison method l voltage comparator ........................................................ 2 circuits l watchdog timer ................................................................. 16 bits l voltage drop detection circuit l clock generating circuit (ceramic resonator) l led drive directly enabled (port d) application microwave oven, rice cooker, audio, telephone, office equipment note: shipped in blank * : under development **: under planning product m34513m2-xxxsp/fp * m34513m4-xxxsp/fp * m34513e4sp/fp * (note) m34513m6-xxxfp ** m34513m8-xxxfp ** m34513e8fp ** (note) m34514m6-xxxfp * m34514m8-xxxfp * m34514e8fp * (note) rom type mask rom mask rom one time prom mask rom mask rom one time prom mask rom mask rom one time prom package sp: 32p4b fp: 32p6b-a sp: 32p4b fp: 32p6b-a sp: 32p4b fp: 32p6b-a 32p6b-a 32p6b-a 32p6b-a 42p2r-a 42p2r-a 42p2r-a ram size ( 5 4 bits) 128 words 256 words 256 words 384 words 384 words 384 words 384 words 384 words 384 words rom (prom) size ( 5 10 bits) 2048 words 4096 words 4096 words 6144 words 8192 words 8192 words 6144 words 8192 words 8192 words 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change.
2 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. pin configuration (top view) 4513 group m34513mx-xxxsp m34513e4sp 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 p1 3 p1 2 p1 1 p1 0 p0 3 p0 2 p0 1 p0 0 a in3 /cmp1+ a in2 /cmp1- a in1 /cmp0+ a in0 /cmp0- p3 1 /int1 p3 0 /int0 vdce v dd d 0 d 1 d 2 d 3 d 4 d 5 d 6 /cntr0 d 7 /cntr1 p2 0 /s ck p2 1 /s out p2 2 /s in reset cnv ss x out x in v ss outline 32p4b 9 10 11 12 13 14 15 16 32 31 30 29 28 27 26 25 m34513mx-xxxfp m34513exfp 24 23 22 21 20 19 18 17 1 2 3 4 5 6 7 8 d 2 d 1 d 0 p1 3 p1 2 p1 1 p1 0 p0 3 reset cnv ss x out x in v ss v dd vdce p3 0 /int0 outline 32p6b-a d 3 d 4 d 5 d 6 /cntr 0 d 7 /cntr 1 p2 0 /s ck p2 1 /s out p2 2 /s in p0 2 p0 1 p0 0 a in3 /cmp1+ a in2 /cmp1- a in1 /cmp0+ a in0 /cmp0- p3 1 /int1
3 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. pin configuration (top view) 4514 group p1 2 p1 1 p1 0 p0 3 p0 2 p0 1 p0 0 a in3 /cmp1+ a in2 /cmp1- a in1 /cmp0+ a in0 /cmp0- p3 1 /int1 p3 0 /int0 vdce v dd m34514mx-xxxfp m34514e8fp outline 42p2r-a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 p1 3 d 1 d 2 d 3 d 4 d 5 d 6 /cntr0 d 7 /cntr1 p2 1 /s out p2 0 /s ck p2 2 /s in cnv ss x out x in v ss reset p4 3 /a in7 p3 2 p3 3 p4 2 /a in6 p4 1 /a in5 p4 0 /a in4 32 31 30 29 28 27 26 25 24 23 22 33 34 35 36 37 38 39 40 41 42 d 0 p5 0 p5 1 p5 2 p5 3 17 18 19 20 21
4 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. block diagram (4513 group) |[go 1 voltage drop detection circuit 4 serial i/o (8 bits 5 1) voltage comparator (2 circuits) x in Cx out i/o port internal peripheral functions timer system clock generating circuit watchdog timer (16 bits) memory rom 2048, 4096,6144, 8192 words 10 bits ram 128, 256, 384 words 4 bits 4500 series cpu core alu (4 bits) register a (4 bits) register b (4 bits) register d (3 bits) register e (8 bits) stack register sk (8 levels) interrupt stack register sdp (1 level) timer 1 (8 bits) timer 2 (8 bits) timer 3 (8 bits) timer 4 (8 bits) a-d converter (10 bits 5 4 ch) port d port p3 port p2 port p1 port p0 4 3 2 8
5 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. block diagram (4514 group) voltage drop detection circuit serial i/o (8 bits 5 1) voltage comparator (2 circuits) x in x out i/o port internal peripheral functions timer system clock generating circuit watchdog timer (16 bits) memory rom 6144, 8192 words 10 bits ram 384 words 4 bits 4500 series cpu core alu (4 bits) register a (4 bits) register b (4 bits) register d (3 bits) register e (8 bits) stack register sk (8 levels) interrupt stack register sdp (1 level) timer 1 (8 bits) timer 2 (8 bits) timer 3 (8 bits) timer 4 (8 bits) a-d converter (10 bits 5 8 ch) port d port p3 port p2 port p1 port p0 port p5 port p4 4 4 4 4 4 8 3
6 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. performance overview function 123 128 0.75 m s (at 4.0 mhz oscillation frequency, in high-speed mode) 2048 words 5 10 bits 4096 words 5 10 bits 6144 words 5 10 bits 8192 words 5 10 bits 6144 words 5 10 bits 8192 words 5 10 bits 128 words 5 4 bits 256 words 5 4 bits 384 words 5 4 bits 384 words 5 4 bits 384 words 5 4 bits 384 words 5 4 bits eight independent i/o ports; ports d 6 and d 7 are also used as cntr0 and cntr1, respectively. 4-bit i/o port; each pin is equipped with a pull-up function and a key-on wakeup function. both functions can be switched by software. 4-bit i/o port; each pin is equipped with a pull-up function and a key-on wakeup function. both functions can be switched by software. 3-bit input port; ports p2 0 , p2 1 and p2 2 are also used as s ck , s out and s in , respectively. 4-bit i/o port (2-bit i/o port for the 4513 group); ports p3 0 and p3 1 are also used as int0 and int1, respectively. the 4513 group does not have ports p3 2 , p3 3 . 4-bit i/o port; the 4513 group does not have this port. 4-bit i/o port with a direction register; the 4513 group does not have this port. 1-bit i/o; cntr0 pin is also used as port d 6 . 1-bit i/o; cntr1 pin is also used as port d 7 . 1-bit input; int0 pin is also used as port p3 0 and equipped with a key-on wakeup function. 1-bit input; int1 pin is also used as port p3 1 and equipped with a key-on wakeup function. 8-bit programmable timer with a reload register. 8-bit programmable timer with a reload register is also used as an event counter. 8-bit programmable timer with a reload register. 8-bit programmable timer with a reload register is also used as an event counter. 10-bit wide, this is equipped with an 8-bit comparator function. 2 circuits (cmp0, cmp1) 8-bit 5 1 8 (two for external, four for timer, one for a-d, and one for serial i/o) 1 level 8 levels cmos silicon gate 32-pin plastic molded sdip (32p4b)/lqfp(32p6b-a) 42-pin plastic molded ssop (42p2r-a) C20 c to 85 c 2.0 v to 5.5 v for mask rom version, 2.5 v to 5.5 v for one time prom version (refer to the electrical characteristics because the supply voltage depends on the oscillation frequency.) 1.8 ma (at v dd = 5.0 v, 4.0 mhz oscillation frequency, in middle- speed mode, output transis- tors in the cut-off state) 3.0 ma (at v dd = 5.0 v, 4.0 mhz oscillation frequency, in high-speed mode, output transistors in the cut-off state) 0.1 m a (at room temperature, v dd = 5 v, output transistors in the cut-off state) parameter number of basic instructions minimum instruction execution time memory sizes input/output ports timers a-d converter voltage comparator serial i/o interrupt subroutine nesting device structure package operating temperature range supply voltage power dissipation (typical value) rom ram d 0 Cd 7 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 Cp2 2 p3 0 Cp3 3 p4 0 Cp4 3 p5 0 Cp5 3 cntr0 cntr1 int0 int1 timer 1 timer 2 timer 3 timer 4 sources nesting 4513 group 4514 group active mode ram back-up mode 4513 group 4514 group m34513m2 m34513m4/e4 m34513m6 m34513m8/e8 m34514m6 m34514m8/e8 m34513m2 m34513m4/e4 m34513m6 m34513m8/e8 m34514m6 m34514m8/e8 i/o (input is examined by skip decision) i/o i/o input i/o i/o i/o i/o i/o input input
7 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. pin description name power supply ground voltage drop detec- tion circuit enable cnv ss reset input system clock input system clock output i/o port d (input is examined by skip decision.) i/o port p0 i/o port p1 input port p2 i/o port p3 i/o port p4 i/o port p5 analog input timer input/output timer input/output interrupt input serial data input serial data output serial i/o clock input/output voltage comparator input voltage comparator input pin v dd v ss vdce cnv ss reset x in x out d 0 Cd 7 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 Cp2 2 p3 0 Cp3 3 p4 0 Cp4 3 p5 0 Cp5 3 a in0 Ca in7 cntr0 cntr1 int0, int1 s in s out s ck cmp0- cmp0+ cmp1- cmp1+ input/output input i/o input output i/o i/o i/o input i/o i/o i/o input i/o i/o input input output i/o input input function connected to a plus power supply. connected to a 0 v power supply. vdce pin is used to control the operation/stop of the voltage drop detection circuit. when h level is input to this pin, the circuit is operating. when l level is inpu to this pin, the circuit is stopped. connect cnv ss to v ss and apply l (0v) to cnv ss certainly. an n-channel open-drain i/o pin for a system reset. when the watchdog timer causes the system to be reset or system reset is performed by the voltage drop de- tection circuit, the reset pin outputs l level. i/o pins of the system clock generating circuit. x in and x out can be connected to ceramic resonator. a feedback resistor is built-in between them. each pin of port d has an independent 1-bit wide i/o function. each pin has an out- put latch. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. ports d 6 and d 7 are also used as cntr0 and cntr1, respectively. each of ports p0 and p1 serves as a 4-bit i/o port, and it can be used as inputs when the output latch is set to 1. the output structure is n-channel open-drain. every pin of the ports has a key-on wakeup function and a pull-up function. both functions can be switched by software. 3-bit input port. ports p2 0 , p2 1 and p2 2 are also used as s ck , s out and s in , re- spectively. 4-bit i/o port (2-bit i/o port for the 4513 group). for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. ports p3 0 and p3 1 are also used as int0 and int1, respectively. the 4513 group does not have ports p3 2 , p3 3 . 4-bit i/o port. for input use, set the latch of the specified bit to 1. the output structure is n-channel open-drain. ports p4 0 Cp4 3 are also used as analog input pins a in4 Ca in7 , respectively. the 4513 group does not have port p4. 4-bit i/o port. each pin has a direction register and an independent 1-bit wide i/o function. for input use, set the direction register to 0. for output use, set the di- rection regiser to 1. the output structure is cmos. the 4513 group does not have port p5. analog input pins for a-d converter. a in0 Ca in3 are also used as comparator input pins and a in4 Ca in7 are also used as port p4. the 4513 group does not have a in4 Ca in7 . cntr0 pin has the function to input the clock for the timer 2 event counter, and to output the timer 1 underflow signal divided by 2. cntr0 pin is also used as port d 6 . cntr1 pin has the function to input the clock for the timer 4 event counter, and to output the timer 3 underflow signal divided by 2. cntr1 pin is also used as port d 7 . int0, int1 pins accept external interrupts. they also accept the input signal to re- turn the system from the ram back-up state. int0, int1 pins are also used as ports p3 0 and p3 1 , respectively. s in pin is used to input serial data signals by software. s in pin is also used as port p2 2 . s out pin is used to output serial data signals by software. s out pin is also used as port p2 1 . s ck pin is used to input and output synchronous clock signals for serial data trans- fer by software. s ck pin is also used as port p2 0 . cmp0-, cmp0+ pins are used as the voltage comparator input pin when the volt- age comparator function is selected by software. cmp0-, cmp0+ pins are also used as a in0 and a in1 . cmp1-, cmp1+ pins are used as the voltage comparator input pin when the volt- age comparator function is selected by software. cmp1-, cmp1+ pins are also used as a in2 and a in3 .
8 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. notes 1: pins except above have just single function. 2: the input of d 6 , d 7 , p2 0 Cp2 2 , cmp0-, cmp0+, cmp1-, cmp1+ and the input/output of p3 0 , p3 1 , p4 0 Cp4 3 can be used even when cntr0, cntr1, s ck , s out , s in , int0, int1, and a in0 Ca in7 are selected. 3: the 4513 group does not have p4 0 /a in4 Cp4 3 /a in7 . notes 1: after system is released from reset, port p5 is in a input mode (di- rection register fr0 = 0000 2 ) 2: when the p0 0 Cp0 3 and p1 0 Cp1 3 are connected to v ss , turn off their pull-up transistors (register pu0i=0) and also invalidate the key-on wakeup functions (register k0i=0) by software. when these pins are connected to v ss while the key-on wakeup func- tions are left valid, the system fails to return from ram back-up state. when these pins are open, turn on their pull-up transistors (register pu0i=1) by software, or set the output latch to 0. be sure to select the key-on wakeup functions and the pull-up functions with every two pins. if only one of the two pins for the key-on wakeup function is used, turn on their pull-up transistors by software and also disconnect the other pin. (i = 0, 1, 2, or 3.) (note when the output latch is set to 0 and pins are open) l after system is released from reset, port is in a high-impedance state un- til it is set the output latch to 0 by software. accordingly, the voltage level of pins is undefined and the excess of the supply current may occur while the port is in a high-impedance state. l to set the output latch periodically by software is recommended because value of output latch may change by noise or a program run away (caused by noise). (note when connecting to v ss and v dd ) l connect the unused pins to v ss and v dd using the thickest wire at the shortest distance against noise. pin d 6 d 7 p2 0 p2 1 p2 2 p3 0 p3 1 multifunction cntr0 cntr1 s ck s out s in int0 int1 multifunction multifunction cmp0- cmp0+ cmp1- cmp1+ a in4 a in5 a in6 a in7 pin a in0 a in1 a in2 a in3 p4 0 p4 1 p4 2 p4 3 connections of unused pins connection open (when using an external clock). connect to v ss . connect to v ss , or set the output latch to 0 and open. connect to v ss . connect to v ss , or set the output latch to 0 and open. connect to v ss , or set the output latch to 0 and open. when the input mode is selected by soft- ware, pull-up to v dd through a resistor or pull-down to v dd . when selecting the output mode, open. connect to v ss . open or connect to v ss (note 2) open or connect to v ss (note 2) pin x out vdce d 0 Cd 5 d 6 /cntr0 d 7 /cntr1 p2 0 /s ck p2 1 /s out p2 2 /s in p3 0 /int0 p3 1 /int1 p3 2 , p3 3 p4 0 /a in4 Cp4 3 /a in7 p5 0 Cp5 3 (note 1) a in0 /cmp0- a in1 /cmp0+ a in2 /cmp1- a in3 /cmp1+ p0 0 Cp0 3 p1 0 Cp1 3 pin cntr0 cntr1 s ck s out s in int0 int1 multifunction d 6 d 7 p2 0 p2 1 p2 2 p3 0 p3 1 multifunction a in0 a in1 a in2 a in3 p4 0 p4 1 p4 2 p4 3 pin cmp0- cmp0+ cmp1- cmp1+ a in4 a in5 a in6 a in7
9 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. notes 1: the 4513 group does not have p3 2 and p3 3 . 2: the 4513 group does not have these ports. definition of clock and cycle l system clock the system clock is the basic clock for controlling this product. the system clock is selected by the bit 3 of the clock control reg- ister mr. port function port port d port p0 port p1 port p2 port p3 (note 1) port p4 (note 2) port p5 (note 2) i/o unit 1 4 4 3 4 4 4 control instructions sd, rd szd cld op0a iap0 op1a iap1 iap2 op3a iap3 op4a iap4 op5a iap5 control registers w6 pu0, k0 pu0, k0 j1 i1, i2 q2 fr0 output structure n-channel open-drain n-channel open-drain n-channel open-drain n-channel open-drain n-channel open-drain cmos input output i/o (8) i/o (4) i/o (4) input (3) i/o (4) i/o (4) i/o (4) remark built-in programmable pull-up functions key-on wakeup functions (programmable) built-in programmable pull-up functions key-on wakeup functions (programmable) built-in key-on wakeup function (p3 0 /int0, p3 1 /int1) pin d 0 Cd 5 d 6 /cntr0 d 7 /cntr1 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 /s ck p2 1 /s out p2 2 /s in p3 0 /int0 p3 1 /int1 p3 2 , p3 3 p4 0 /a in4 Cp4 3 /a in7 p5 0 Cp5 3 register mr mr 3 0 1 system clock f(x in ) f(x in )/2 note: f(x in )/2 is selected after system is released from reset. l instruction clock the instruction clock is a signal derived by dividing the system clock by 3. the one instruction clock cycle generates the one machine cycle. l machine cycle the machine cycle is the standard cycle required to execute the instruction. table selection of system clock
10 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. port block diagrams d t q ai p0 0 ,p0 1 k0 0 pu0 0 d t q ai p0 2 ,p0 3 k0 1 pu0 1 d t q ai p1 0 ,p1 1 k0 2 pu0 2 d t q ai p1 2 ,p1 3 k0 3 pu0 3 key-on wakeup input pull-up transistor op0a instruction iap0 instruction key-on wakeup input pull-up transistor op0a instruction iap0 instruction key-on wakeup input pull-up transistor op1a instruction iap1 instruction key-on wakeup input pull-up transistor register a op1a instruction iap1 instruction this symbol represents a parasitic diode on the port. i represents 0, 1, 2, or 3. ? ? register a register a register a
11 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. port block diagrams (continued) synchronous clock input for serial transfer register a iap2 instruction p2 0 /s ck j1 0 synchronous clock output for serial transfer p3 0 /int0,p3 1 /int1 d t q external interrupt circuit register a ai iap3 instruction op3a instruction j1 1 1 0 p2 1 /s out register a iap2 instruction serial data output j1 1 0 1 p2 2 /s in register a iap2 instruction serial data input p3 2 ,p3 3 d t q register a ai iap3 instruction op3a instruction key-on wakeup input this symbol represents a parasitic diode on the port. ?applied potential to ports p2 0 ?2 2 must be v dd . ?i represents 0, 1, 2, or 3. ?the 4513 group does not have ports p3 2 , p3 3 .
12 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. port block diagrams (continued) a in0 /cmp0- q1 q3 0 a in1 /cmp0+ + - q3 2 a in2 /cmp1- q3 1 a in3 /cmp1+ + - q3 3 op4a instruction iap4 instruction p4 0 /a in4 ?4 3 /a in7 dq t register a ai q1 q1 q1 q1 decoder analog input decoder analog input analog input analog input analog input this symbol represents a parasitic diode on the port. ?i represents 0, 1, 2, or 3. ?the 4513 group does not have port p4. decoder decoder decoder cmp0 cmp1
13 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. port block diagrams (continued) p5 0 Cp5 3 d t q op5a instruction ai register a iap5 instruction d 0 Cd 5 sd instruction s r q decoder skip decision (szd instruction) register y rd instruction d 6 /cntr0 s r q skip decision (szd instruction) sd instruction decoder register y rd instruction 0 1 1/2 w6 0 timer 1 underflow signal output clock input for timer 2 event count d 7 /cntr1 s r q 0 1 1/2 w6 2 direction register fr0i skip decision (szd instruction) sd instruction decoder register y rd instruction timer 3 underflow signal output clock input for timer 4 event count this symbol represents a parasitic diode on the port. ? applied potential to ports d 0 Cd 7 must be 12 v. ? i represents 0, 1, 2, or 3. ? the 4513 group does not have port p5. ?
14 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. external interrupt circuit structure 0 1 i2 2 0 1 exf1 i2 1 snzi1 p3 1 /int1 0 1 i1 2 wakeup skip 0 1 exf0 i1 1 snzi0 p3 0 /int0 rising falling one-sided edge detection circuit both edges detection circuit external 0 interrupt external 1 interrupt wakeup skip rising falling one-sided edge detection circuit both edges detection circuit
15 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. function block operations cpu (1) arithmetic logic unit (alu) the arithmetic logic unit alu performs 4-bit arithmetic such as 4- bit data addition, comparison, and operation, or operation, and bit manipulation. (2) register a and carry flag register a is a 4-bit register used for arithmetic, transfer, ex- change, and i/o operation. carry flag cy is a 1-bit flag that is set to 1 when there is a carry with the amc instruction (figure 1). it is unchanged with both a n instruction and am instruction. the value of a 0 is stored in carry flag cy with the rar instruction (fig- ure 2). carry flag cy can be set to 1 with the sc instruction and cleared to 0 with the rc instruction. (3) registers b and e register b is a 4-bit register used for temporary storage of 4-bit data, and for 8-bit data transfer together with register a. register e is an 8-bit register. it can be used for 8-bit data transfer with register b used as the high-order 4 bits and register a as the low-order 4 bits (figure 3). (4) register d register d is a 3-bit register. it is used to store a 7-bit rom address together with register a and is used as a pointer within the specified page when the tabp p, bla p, or bmla p instruction is executed (figure 4). fig. 1 amc instruction execution example fig. 2 rar instruction execution example fig. 3 registers a, b and register e fig. 4 tabp p instruction execution example (cy) (m(dp)) (a) addition alu cy a 3 a 2 a 1 a 0 a 0 cy a 3 a 2 a 1 rar instruction sc instruction rc instruction a 3 a 2 a 1 a 0 b 3 b 2 b 1 b 0 e 7 e 6 e 5 e 4 e 3 e 2 e 1 e 0 a 3 a 2 a 1 a 0 b 3 b 2 b 1 b 0 tab instruction teab instruction tabe instruction tba instruction register b register a register b register a register e specifying address tabp p instruction p 6 p 5 p 4 p 3 p 2 p 1 p 0 pc h dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 pc l immediate field value p the contents of register d rom 840 middle-order 4 bits low-order 4bits register a (4) register b (4) the contents of register a
16 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (5) stack registers (sk s ) and stack pointer (sp) stack registers (sks) are used to temporarily store the contents of program counter (pc) just before branching until returning to the original routine when; ? branching to an interrupt service routine (referred to as an inter- rupt service routine), ? performing a subroutine call, or ? executing the table reference instruction (tabp p). stack registers (sks) are eight identical registers, so that subrou- tines can be nested up to 8 levels. however, one of stack registers is used respectively when using an interrupt service routine and when executing a table reference instruction. accordingly, be care- ful not to over the stack when performing these operations together. the contents of registers sks are destroyed when 8 lev- els are exceeded. the register sk nesting level is pointed automatically by 3-bit stack pointer (sp). the contents of the stack pointer (sp) can be transferred to register a with the tasp instruction. figure 5 shows the stack registers (sks) structure. figure 6 shows the example of operation at subroutine call. (6) interrupt stack register (sdp) interrupt stack register (sdp) is a 1-stage register. when an inter- rupt occurs, this register (sdp) is used to temporarily store the contents of data pointer, carry flag, skip flag, register a, and regis- ter b just before an interrupt until returning to the original routine. unlike the stack registers (sks), this register (sdp) is not used when executing the subroutine call instruction and the table refer- ence instruction. (7) skip flag skip flag controls skip decision for the conditional skip instructions and continuous described skip instructions. when an interrupt oc- curs, the contents of skip flag is stored automatically in the interrupt stack register (sdp) and the skip condition is retained. fig. 5 stack registers (sks) structure fig. 6 example of operation at subroutine call returning to the bm instruction executio n address with the rt instruction, and the b m instruction becomes the nop instruction. (sp) ? 0 (sk 0 ) ? 0001 16 (pc) ? sub1 main program 0002 16 nop address 0000 16 nop 0001 16 bm sub1 subroutine sub1 : nop rt (pc) ? (sk 0 ) (sp) ? 7 note : sk 0 sk 1 sk 2 sk 3 sk 4 sk 5 sk 6 sk 7 (sp) = 0 (sp) = 1 (sp) = 2 (sp) = 3 (sp) = 4 (sp) = 5 (sp) = 6 (sp) = 7 program counter (pc) executing rt instruction executing bm instruction stack pointer (sp) points ??at reset or returning from ram back-up mode. it points ?? by executing the first bm instruction, and the contents of program counter is stored in sk 0 . when the bm instruction is executed after eight stack registers are used ((sp) = 7), (sp) = 0 and the contents of sk 0 is destroyed.
17 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (8) program counter (pc) program counter (pc) is used to specify a rom address (page and address). it determines a sequence in which instructions stored in rom are read. it is a binary counter that increments the number of instruction bytes each time an instruction is executed. however, the value changes to a specified address when branch instructions, subroutine call instructions, return instructions, or the table refer- ence instruction (tabp p) is executed. program counter consists of pc h (most significant bit to bit 7) which specifies to a rom page and pc l (bits 6 to 0) which speci- fies an address within a page. after it reaches the last address (address 127) of a page, it specifies address 0 of the next page (figure 7). make sure that the pc h does not specify after the last page of the built-in rom. (9) data pointer (dp) data pointer (dp) is used to specify a ram address and consists of registers z, x, and y. register z specifies a ram file group, reg- ister x specifies a file, and register y specifies a ram digit (figure 8). register y is also used to specify the port d bit position. when using port d, set the port d bit position to register y certainly and execute the sd, rd, or szd instruction (figure 9). fig. 7 program counter (pc) structure fig. 8 data pointer (dp) structure fig. 9 sd instruction execution example z 1 z 0 x 3 x 2 x 1 x 0 y 3 y 2 y 1 y 0 data pointer (dp) register z (2) register x (4) register y (4) specifying ram digit specifying ram file specifying ram file group 01 01 1 d 7 set specifying bit position port d output latch register y (4) d 5 d 6 d 4 d 0 p 5 p 4 p 3 p 2 p 1 p 0 a 6 a 5 a 4 a 3 a 2 a 1 a 0 program counter pc h specifying page pc l specifying address p 6
18 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminar y notice: this is not a final specification. some parametric limits are subject to change. program memory (rom) the program memory is a mask rom. 1 word of rom is composed of 10 bits. rom is separated every 128 words by the unit of page (addresses 0 to 127). t able 1 shows the rom size and pages. fig- ure 10 shows the rom map of m34514m8/e8. t able 1 rom size and pages product m34513m2 m34513m4/e4 m34513m6 m34513m8/e8 m34514m6 m34514m8/e8 rom size ( 5 10 bits) 2048 words 4096 words 6144 words 8192 words 6144 words 8192 words pages 16 (0 to 15) 32 (0 to 31) 48 (0 to 47) 64 (0 to 63) 48 (0 to 47) 64 (0 to 63) a part of page 1 (addresses 0080 16 to 00ff 16 ) is reserved for in- terrupt addresses (figure 1 1). when an interrupt occurs, the address (interrupt address) corresponding to each interrupt is set in the program counter , and the instruction at the interrupt address is executed. when using an interrupt service routine, write the in- struction generating the branch to that routine at an interr upt address. page 2 (addresses 0100 16 to 017f 16 ) is the special page for sub- routine calls. subroutines written in this page can be calle d from any page with the 1-word instruction (bm). subroutines exten ding from page 2 to another page can also be called with the bm i n- struction when it starts on page 2. rom pattern (bits 7 to 0) of all addresses can be used as da ta ar- eas with the t abp p instruction. fig. 10 rom map of m34514m8/e8 fig. 1 1 page 1 (addresses 0080 16 to 00ff 16 ) structure 90 8765 4321 external 0 interrupt address external 1 interrupt address 0080 16 0082 16 timer 1 interrupt address 0084 16 timer 2 interrupt address 0086 16 timer 3 interrupt address 0088 16 008a 16 00ff 16 timer 4 interrupt address a-d interrupt address serial i/o interrupt address 008c 16 008e 16 0 876 54321 0000 16 0080 16 017 f 16 subroutine special page 007 f 16 00 ff 16 0100 16 1 fff 16 0180 16 page 1 page 2 page 0 page 3 page 31 0 fff 16 interrupt address page page 63 9
19 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. data memory (ram) 1 word of ram is composed of 4 bits, but 1-bit manipulation (with the sb j, rb j, and szb j instructions) is enabled for the entire memory area. a ram address is specified by a data pointer. the data pointer consists of registers z, x, and y. set a value to the data pointer certainly when executing an instruction to access ram. table 2 shows the ram size. figure 12 shows the ram map. fig. 12 ram map table 2 ram size product m34513m2 m34513m4/e4 m34513m6 m34513m8/e8 m34514m6 m34514m8/e8 ram size 128 words 5 4 bits (512 bits) 256 words 5 4 bits (1024 bits) 384 words 5 4 bits (1536 bits) 384 words 5 4 bits (1536 bits) 384 words 5 4 bits (1536 bits) 384 words 5 4 bits (1536 bits) m34513m6 m34513m8/e8 m34514m6 m34514m8/e8 m34513m4/e4 m34513m2 z=0, x=0 to 15 z=0, x=0 to 7 z=0, x=0 to 15 z=1, x=0 to 7 register y register z register x 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 01 7 1 ram 384 words 5 4 bits (1536 bits) 23 6 0 15 384 words 256 words 128 words 45 17 23 6 45
20 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. interrupt function the interrupt type is a vectored interrupt branching to an individual address (interrupt address) according to each interrupt source. an interrupt occurs when the following 3 conditions are satisfied. ? an interrupt activated condition is satisfied (request flag = 1) ? interrupt enable bit is enabled (1) ? interrupt enable flag is enabled (inte = 1) table 3 shows interrupt sources. (refer to each interrupt request flag for details of activated conditions.) (1) interrupt enable flag (inte) the interrupt enable flag (inte) controls whether the every inter- rupt enable/disable. interrupts are enabled when inte flag is set to 1 with the ei instruction and disabled when inte flag is cleared to 0 with the di instruction. when any interrupt occurs, the inte flag is automatically cleared to 0, so that other interrupts are disabled until the ei instruction is executed. (2) interrupt enable bit use an interrupt enable bit of interrupt control registers v1 and v2 to select the corresponding interrupt or skip instruction. table 4 shows the interrupt request flag, interrupt enable bit and skip instruction. table 5 shows the interrupt enable bit function. (3) interrupt request flag when the activated condition for each interrupt is satisfied, the cor- responding interrupt request flag is set to 1. each interrupt request flag is cleared to 0 when either; ? an interrupt occurs, or ? the next instruction is skipped with a skip instruction. each interrupt request flag is set when the activated condition is satisfied even if the interrupt is disabled by the inte flag or its in- terrupt enable bit. once set, the interrupt request flag retains set until a clear condition is satisfied. accordingly, an interrupt occurs when the interrupt disable state is released while the interrupt request flag is set. if more than one interrupt request flag is set when the interrupt dis- able state is released, the interrupt priority level is as follows shown in table 3. table 3 interrupt sources activated condition level change of int0 pin level change of int1 pin timer 1 underflow timer 2 underflow timer 3 underflow timer 4 underflow completion of a-d conversion completion of serial i/o transfer priority level 1 2 3 4 5 6 7 8 interrupt name external 0 interrupt external 1 interrupt timer 1 interrupt timer 2 interrupt timer 3 interrupt timer 4 interrupt a-d interrupt serial i/o interrupt request flag exf0 exf1 t1f t2f t3f t4f adf siof interrupt name external 0 interrupt external 1 interrupt timer 1 interrupt timer 2 interrupt timer 3 interrupt timer 4 interrupt a-d interrupt serial i/o interrupt table 5 interrupt enable bit function occurrence of interrupt enabled disabled skip instruction invalid valid interrupt enable bit 1 0 interrupt address address 0 in page 1 address 2 in page 1 address 4 in page 1 address 6 in page 1 address 8 in page 1 address a in page 1 address c in page 1 address e in page 1 table 4 interrupt request flag, interrupt enable bit and skip in- struction skip instruction snz0 snz1 snzt1 snzt2 snzt3 snzt4 snzad snzsi enable bit v1 0 v1 1 v1 2 v1 3 v2 0 v2 1 v2 2 v2 3
21 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (4) internal state during an interrupt the internal state of the microcomputer during an interrupt is as fol- lows (figure 14). ? program counter (pc) an interrupt address is set in program counter. the address to be executed when returning to the main routine is automatically stored in the stack register (sk). ? interrupt enable flag (inte) inte flag is cleared to 0 so that interrupts are disabled. ? interrupt request flag only the request flag for the current interrupt source is cleared to 0. ? data pointer, carry flag, skip flag, registers a and b the contents of these registers and flags are stored automatically in the interrupt stack register (sdp). (5) interrupt processing when an interrupt occurs, a program at an interrupt address is ex- ecuted after branching a data store sequence to stack register. write the branch instruction to an interrupt service routine at an in- terrupt address. use the rti instruction to return from an interrupt service routine. interrupt enabled by executing the ei instruction is performed after executing 1 instruction (just after the next instruction is executed). accordingly, when the ei instruction is executed just before the rti instruction, interrupts are enabled after returning the main routine. (refer to figure 13) fig. 13 program example of interrupt processing ? program counter (pc) .............................................................. each interrupt address ? stack register (sk) .................................................................................................... ? interrupt enable flag (inte) .................................................................. 0 (interrupt disabled) ? interrupt request flag (only the flag for the current interrupt source) ................................................................................... 0 ? data pointer, carry flag, registers a and b, skip flag ........ stored in the interrupt stack register (sdp) automatically the address of main routine to be executed when returning fig. 15 interrupt system diagram fig. 14 internal state when interrupt occurs ei rti interrupt service routine interrupt occurs interrupt is enabled main rouine : interrupt enabled state : interrupt disabled state ? ? ? ? t1f v1 2 exf1 v1 1 exf0 v1 0 address 2 in page 1 address 4 in page 1 address 0 in page 1 t4f v2 1 t3f v2 0 t2f v1 3 address 8 in page 1 address a in page 1 address 6 in page 1 siof v2 3 adf v2 2 completion of serial i/o transfer timer 1 underflow timer 4 underflow timer 3 underflow timer 2 underflow completion of a-d conversion address e in page 1 address c in page 1 request flag (state retained) enable bit enable flag inte activated condition int0 pin (l ? h or h ? l input) int1 pin (l ? h or h ? l input)
22 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (6) interrupt control registers ? interrupt control register v1 interrupt enable bits of external 0, external 1, timer 1 and timer 2 are assigned to register v1. set the contents of this register through register a with the tv1a instruction. the tav1 instruction can be used to transfer the contents of register v1 to register a. ? interrupt control register v2 interrupt enable bits of timer 3, timer 4, a-d and serial i/o are as- signed to register v2. set the contents of this register through register a with the tv2a instruction. the tav2 instruction can be used to transfer the contents of register v2 to register a. table 6 interrupt control registers v1 3 v1 2 v1 1 v1 0 v2 3 v2 2 v2 1 v2 0 serial i/o interrupt enable bit a-d interrupt enable bit timer 4 interrupt enable bit timer 3 interrupt enable bit interrupt control register v1 timer 2 interrupt enable bit timer 1 interrupt enable bit external 1 interrupt enable bit external 0 interrupt enable bit note: r represents read enabled, and w represents write enabled. interrupt disabled (snzt2 instruction is valid) interrupt enabled (snzt2 instruction is invalid) interrupt disabled (snzt1 instruction is valid) interrupt enabled (snzt1 instruction is invalid) interrupt disabled (snz1 instruction is valid) interrupt enabled (snz1 instruction is invalid) interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) interrupt disabled (snzsi instruction is valid) interrupt enabled (snzsi instruction is invalid) interrupt disabled (snzad instruction is valid) interrupt enabled (snzad instruction is invalid) interrupt disabled (snzt4 instruction is valid) interrupt enabled (snzt4 instruction is invalid) interrupt disabled (snzt3 instruction is valid) interrupt enabled (snzt3 instruction is invalid) 0 1 0 1 0 1 0 1 r/w at ram back-up : 0000 2 at reset : 0000 2 r/w at ram back-up : 0000 2 at reset : 0000 2 interrupt control register v2 r/w at ram back-up : 0000 2 at reset : 0000 2 0 1 0 1 0 1 0 1
23 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (7) interrupt sequence interrupts only occur when the respective inte flag, interrupt en- able bits (v1 0 Cv1 3 and v2 0 Cv2 3 ), and interrupt request flag are 1. the interrupt actually occurs 2 to 3 machine cycles after the cycle in which all three conditions are satisfied. the interrupt oc- curs after 3 machine cycles only when the three interrupt condi- tions are satisfied on execution of other than one-cycle instructions (refer to figure 16). fig. 16 interrupt sequence t 1 t 2 t 3 t 1 t 2 t 3 t 1 t 2 t 3 system clock t 1 t 2 t 3 exf0, exf1 t1f, t2f, t3f, t4f, adf,siof int0, int1 t 1 t 2 t 3 2 to 3 machine cycles (notes 2, 3) the program starts from the interrupt address. flag cleared interrupt enabled state when an interrupt request flag is set after its interrupt is enabled (note 1) 1 machine cycle ei instruction execution cycle interrupt enable flag (inte) retaining level of system clock for 4 periods or more is necessary. interrupt disabled state external interrupt timer 1, timer 2, timer 3, timer 4, a-d, and serial i/o interrupts interrupt activated condition is satisfied. 2: the address is stacked to the last cycle. 3: this interval of cycles depends on the executed instruction at the time when each interrupt activated condition is satisfied . notes 1: the 4513/4514 group operates in the middle-speed mode after system is released from reset. f (x in ) (middle-speed mode) f (x in ) (high-speed mode)
24 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. table 7 external interrupt activated conditions name external 0 interrupt external 1 interrupt input pin p3 0 /int0 p3 1 /int1 activated condition when the next waveform is input to p3 0 /int0 pin ? falling waveform (h ? l) ? rising waveform (l ? h) ? both rising and falling waveforms when the next waveform is input to p3 1 /int1 pin ? falling waveform (h ? l) ? rising waveform (l ? h) ? both rising and falling waveforms valid waveform selection bit i1 1 i1 2 i2 1 i2 2 fig. 17 external interrupt circuit structure external interrupts the 4513/4514 group has two external interrupts (external 0 and external 1). an external interrupt request occurs when a valid waveform is input to an interrupt input pin (edge detection). the external interrupts can be controlled with the interrupt control registers i1 and i2. 0 1 i2 2 0 1 exf1 i2 1 snzi1 p3 1 /int1 0 1 i1 2 wakeup skip 0 1 exf0 i1 1 snzi0 p3 0 /int0 rising falling one-sided edge detection circuit both edges detection circuit external 0 interrupt external 1 interrupt wakeup skip rising falling one-sided edge detection circuit both edges detection circuit
25 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (1) external 0 interrupt request flag (exf0) external 0 interrupt request flag (exf0) is set to 1 when a valid waveform is input to p3 0 /int0 pin. the valid waveforms causing the interrupt must be retained at their level for 4 clock cycles or more of the system clock (refer to figure 16). the state of exf0 flag can be examined with the skip instruction (snz0). use the interrupt control register v1 to select the interrupt or the skip instruction. the exf0 flag is cleared to 0 when an in- terrupt occurs or when the next instruction is skipped with the skip instruction. the p3 0 /int0 pin need not be selected the external interrupt input int0 function or the normal i/o port p3 0 function. however, the exf0 flag is set to 1 when a valid waveform is input even if it is used as an i/o port p3 0 . ? external 0 interrupt activated condition external 0 interrupt activated condition is satisfied when a valid waveform is input to p3 0 /int0 pin. the valid waveform can be selected from rising waveform, falling waveform or both rising and falling waveforms. an example of how to use the external 0 interrupt is as follows. select the valid waveform with the bits 1 and 2 of register i1. clear the exf0 flag to 0 with the snz0 instruction. a set the nop instruction for the case when a skip is performed with the snz0 instruction. ? set both the external 0 interrupt enable bit (v1 0 ) and the inte flag to 1. the external 0 interrupt is now enabled. now when a valid wave- form is input to the p3 0 /int0 pin, the exf0 flag is set to 1 and the external 0 interrupt occurs. (2) external 1 interrupt request flag (exf1) external 1 interrupt request flag (exf1) is set to 1 when a valid waveform is input to p3 1 /int1 pin. the valid waveforms causing the interrupt must be retained at their level for 4 clock cycles or more of the system clock (refer to figure 16). the state of exf1 flag can be examined with the skip instruction (snz1). use the interrupt control register v1 to select the interrupt or the skip instruction. the exf1 flag is cleared to 0 when an in- terrupt occurs or when the next instruction is skipped with the skip instruction. the p3 1 /int1 pin need not be selected the external interrupt input int1 function or the normal i/o port p3 1 function. however, the exf1 flag is set to 1 when a valid waveform is input even if it is used as an i/o port p3 1 . ? external 1 interrupt activated condition external 1 interrupt activated condition is satisfied when a valid waveform is input to p3 1 /int1 pin. the valid waveform can be selected from rising waveform, falling waveform or both rising and falling waveforms. an example of how to use the external 1 interrupt is as follows. select the valid waveform with the bits 1 and 2 of register i2. clear the exf1 flag to 0 with the snz1 instruction. a set the nop instruction for the case when a skip is performed with the snz1 instruction. ? set both the external 1 interrupt enable bit (v1 1 ) and the inte flag to 1. the external 1 interrupt is now enabled. now when a valid wave- form is input to the p3 1 /int1 pin, the exf1 flag is set to 1 and the external 1 interrupt occurs.
26 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (3) external interrupt control registers ? interrupt control register i1 register i1 controls the valid waveform for the external 0 inter- rupt. set the contents of this register through register a with the ti1a instruction. the tai1 instruction can be used to transfer the contents of register i1 to register a. ? interrupt control register i2 register i2 controls the valid waveform for the external 1 inter- rupt. set the contents of this register through register a with the ti2a instruction. the tai2 instruction can be used to transfer the contents of register i2 to register a. table 8 external interrupt control registers i1 3 i1 2 i1 1 i1 0 i2 3 i2 2 i2 1 i2 0 not used interrupt valid waveform for int0 pin/ return level selection bit (note 2) int0 pin edge detection circuit control bit int0 pin timer 1 control enable bit this bit has no function, but read/write is enabled. falling waveform (l level of int1 pin is recognized with the snzi1 instruction)/l level rising waveform (h level of int1 pin is recognized with the snzi1 instruction)/h level one-sided edge detected both edges detected disabled enabled not used interrupt valid waveform for int1 pin/ return level selection bit (note 3) int1 pin edge detection circuit control bit int1 pin timer 3 control enable bit notes 1: r represents read enabled, and w represents write enabled. 2: when the contents of i1 2 is changed, the external interrupt request flag exf0 may be set. accordingly, clear exf0 flag with the snz0 instruction. 3: when the contents of i2 2 is changed, the external interrupt request flag exf1 may be set. accordingly, clear exf1 flag with the snz1 instruction. interrupt control register i1 r/w at ram back-up : state retained at reset : 0000 2 this bit has no function, but read/write is enabled. falling waveform (l level of int0 pin is recognized with the snzi0 instruction)/l level rising waveform (h level of int0 pin is recognized with the snzi0 instruction)/h level one-sided edge detected both edges detected disabled enabled 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 interrupt control register i2 r/w at ram back-up : state retained at reset : 0000 2
27 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. timers the 4513/4514 group has the programmable timers. ? programmable timer the programmable timer has a reload register and enables the frequency dividing ratio to be set. it is decremented from a setting value n. when it underflows (count to n + 1), a timer interrupt re- quest flag is set to 1, new data is loaded from the reload register, and count continues (auto-reload function). ? fixed dividing frequency timer the fixed dividing frequency timer has the fixed frequency divid- ing ratio (n). an interrupt request flag is set to 1 after every n count of a count pulse. fig. 18 auto-reload function ff 16 n 00 16 n : counter initial value count starts reload reload 1st underflow 2nd underflow n+1 count n+1 count time an interrupt occurs or a skip instruction is executed. timer interrupt request flag the contents of counter ? ?
28 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. count source ? instruction clock ? prescaler output (orclk) ? timer 1 underflow ? prescaler output (orclk) ? cntr0 input ? 16-bit counter underflow ? timer 2 underflow ? prescaler output (orclk) ? timer 3 underflow ? prescaler output (orclk) ? cntr1 input ? instruction clock structure frequency divider 8-bit programmable binary down counter (link to exf0) 8-bit programmable binary down counter 8-bit programmable binary down counter (link to exf1) 8-bit programmable binary down counter 16-bit fixed dividing frequency circuit prescaler timer 1 timer 2 timer 3 timer 4 16-bit timer use of output signal ? timer 1, 2, 3 and 4 count sources ? timer 2 count source ? cntr0 output ? timer 1 interrupt ? timer 3 count source ? timer 2 interrupt ? cntr0 output ? timer 4 count source ? timer 3 interrupt ? cntr1 output ? timer 4 interrupt ? cntr1 output ? watchdog timer (the 15th bit is counted twice) ? timer 2 count source (16-bit counter underflow) frequency dividing ratio 4, 16 1 to 256 1 to 256 1 to 256 1 to 256 65536 control register w1 w1 w6 w2 w6 w3 w6 w4 w6 the 4513/4514 group timer consists of the following circuits. ? prescaler : frequency divider ? timer 1 : 8-bit programmable timer ? timer 2 : 8-bit programmable timer ? timer 3 : 8-bit programmable timer ? timer 4 : 8-bit programmable timer (timers 1 to 4 have the interrupt function, respectively) ? 16-bit timer prescaler and timers 1 to 4 can be controlled with the timer control registers w1 to w6. the 16-bit timer is a free counter which is not controlled with the control register. each function is described below. table 9 function related timers
29 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. fig. 19 timers structure d 6 /cntr0 d 6 output t4f timer 4 interrupt t3f timer 3 interrupt 0 1 w6 0 10 01 00 w3 1 ,w3 0 0 1 w3 3 (note) 0 1 w4 3 (note) not available 11 not available 11 10 01 00 w4 1 ,w4 0 not available orclk t1f (t2ab) t2f (tab2) 0 1 w2 3 (note) w2 1 ,w2 0 11 10 01 00 q r s wrst instruction 1 - - - - - - - - - - - 15 16 wdf1 wdf2 wef 1/4 1/16 1 0 w1 2 1 0 w1 3 mr 3 1 0 x in d 7 /cntr1 d 7 output 0 1 w6 2 q r s w1 0 1 0 0 1 (note) w1 1 (tr1ab) t1ab t1ab (tab1) (t4ab) (tab4) (tr3ab) t3ab t3ab (tab3) w3 2 1 0 q r s i2 0 i1 0 0 1 w6 1 timer 2 underflow signal 0 1 w6 3 timer 4 underflow signal 1/2 1/2 1/2 1/2 division circuit (divided by 2) internal clock generation circuit (divided by 3) instruction clock prescaler timer 1 (8) timer 1 interrupt reload register r1 (8) register b register a timer 1 underflow signal timer 2 (8) reload register r2 (8) register b register a timer 2 underflow signal timer 3 (8) reload register r3 (8) register b register a timer 3 underflow signal timer 4 (8) reload register r4 (8) register b register a instruction clock 16-bit timer (wdt) system reset reset signal timer 2 interrupt data is set automatically from each reload register when timer 1, 2, 3, or 4 underflows (auto- reload function) note: count source is stopped by clearing to ?. 0 1 p3 0 /int0 i1 2 0 1 p3 1 /int1 i2 2
30 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. table 10 timer control registers 0 1 0 1 0 1 0 1 w2 1 0 0 1 1 stop (state initialized) operating instruction clock divided by 4 instruction clock divided by 16 stop (state retained) operating count start synchronous circuit not selected count start synchronous circuit selected prescaler control bit prescaler dividing ratio selection bit timer 1 control bit timer 1 count start synchronous circuit control bit stop (state retained) operating this bit has no function, but read/write is enabled. count source timer 1 underflow signal prescaler output cntr0 input 16 bit timer (wdt) underflow signal timer 2 control bit not used timer 2 count source selection bits 0 1 0 1 w2 0 0 1 0 1 w1 3 w1 2 w1 1 w1 0 w2 3 w2 2 w2 1 w2 0 w3 3 w3 2 w3 1 w3 0 w4 3 w4 2 w4 1 w4 0 w6 3 w6 2 w6 1 w6 0 timer control register w1 r/w at ram back-up : 0000 2 at reset : 0000 2 r/w at ram back-up : 0000 2 at reset : 0000 2 timer control register w2 r/w at ram back-up : state retained at reset : 0000 2 w3 1 0 0 1 1 stop (state retained) operating count start synchronous circuit not selected count start synchronous circuit selected count source timer 2 underflow signal prescaler output not available not available timer 3 control bit timer 3 count start synchronous circuit control bit timer 3 count source selection bits 0 1 0 1 w3 0 0 1 0 1 timer control register w3 r/w at ram back-up : state retained at reset : 0000 2 w4 1 0 0 1 1 stop (state retained) operating this bit has no function, but read/write is enabled. count source timer 3 underflow signal prescaler output cntr1 input not available timer 4 control bit not used timer 4 count source selection bits 0 1 0 1 w4 0 0 1 0 1 timer control register w4 r/w at ram back-up : state retained at reset : 0000 2 timer 3 underflow signal output divided by 2 cntr1 output control by timer 4 underflow signal divided by 2 d 7 (i/o)/cntr1 input cntr1 (i/o)/d 7 (input) timer 1 underflow signal output divided by 2 cntr0 output control by timer 2 underflow signal divided by 2 d 6 (i/o)/cntr0 input cntr0 (i/o)/d 6 (input) cntr1 output control bit d 7 /cntr1 function selection bit cntr0 output control bit d 6 /cntr0 output control bit 0 1 0 1 0 1 0 1 timer control register w6 r/w at ram back-up : state retained at reset : 0000 2 note: r represents read enabled, and w represents write enabled.
31 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (1) timer control registers ? timer control register w1 register w1 controls the count operation of timer 1, the selection of count start synchronous circuit, and the frequency dividing ra- tio and count operation of prescaler. set the contents of this register through register a with the tw1a instruction. the taw1 instruction can be used to transfer the contents of register w1 to register a. ? timer control register w2 register w2 controls the count operation and count source of timer 2. set the contents of this register through register a with the tw2a instruction. the taw2 instruction can be used to trans- fer the contents of register w2 to register a. ? timer control register w3 register w3 controls the count operation and count source of timer 3 and the selection of count start synchronous circuit. set the contents of this register through register a with the tw3a in- struction. the taw3 instruction can be used to transfer the contents of register w3 to register a. ? timer control register w4 register w4 controls the count operation and count source of timer 4. set the contents of this register through register a with the tw4a instruction. the taw4 instruction can be used to trans- fer the contents of register w4 to register a. ? timer control register w6 register w6 controls the d 6 /cntr0 pin and d 7 /cntr1 func- tions, the selection and operation of the cntr0 and cntr1 output. set the contents of this register through register a with the tw6a instruction. the taw6 instruction can be used to trans- fer the contents of register w6 to register a. (2) precautions note the following for the use of timers. ? prescaler stop the prescaler operation to change its frequency dividing ra- tio. ? count source stop timer 1, 2, 3, or 4 counting to change its count source. ? reading the count value stop timer 1, 2, 3, or 4 counting and then execute the tab1, tab2, tab3, or tab4 instruction to read its data. ? writing to reload registers r1 and r3 when writing data to reload registers r1 or r3 while timer 1 or timer 3 is operating, avoid a timing when timer 1 or timer 3 underflows. (3) prescaler prescaler is a frequency divider. its frequency dividing ratio can be selected. the count source of prescaler is the instruction clock. use the bit 2 of register w1 to select the prescaler dividing ratio and the bit 3 to start and stop its operation. prescaler is initialized, and the output signal (orclk) stops when the bit 3 of register w1 is cleared to 0. (4) timer 1 (interrupt function) timer 1 is an 8-bit binary down counter with the timer 1 reload reg- ister (r1). data can be set simultaneously in timer 1 and the reload register (r1) with the t1ab instruction. data can be written to re- load register (r1) with the tr1ab instruction. when writing data to reload register r1 with the tr1ab instruction, the downcount after the underflow is started from the setting value of reload register r1. timer 1 starts counting after the following process; set data in timer 1, and set the bit 1 of register w1 to 1. however, p3 0 /int0 pin input can be used as the start trigger for timer 1 count operation by setting the bit 0 of register w1 to 1. once count is started, when timer 1 underflows (the next count pulse is input after the contents of timer 1 becomes 0), the timer 1 interrupt request flag (t1f) is set to 1, new data is loaded from reload register r1, and count continues (auto-reload function). when a value set in reload register r1 is n, timer 1 divides the count source signal by n + 1 (n = 0 to 255). data can be read from timer 1 with the tab1 instruction. when reading the data, stop the counter and then execute the tab1 in- struction. timer 1 underflow signal divided by 2 can be output from d 6 /cntr0 pin. (5) timer 2 (interrupt function) timer 2 is an 8-bit binary down counter with the timer 2 reload reg- ister (r2). data can be set simultaneously in timer 2 and the reload register (r2) with the t2ab instruction. timer 2 starts counting after the following process; set data in timer 2, select the count source with the bits 0 and 1 of register w2, and a set the bit 3 of register w2 to 1. once count is started, when timer 2 underflows (the next count pulse is input after the contents of timer 2 becomes 0), the timer 2 interrupt request flag (t2f) is set to 1, new data is loaded from reload register r2, and count continues (auto-reload function). when a value set in reload register r2 is n, timer 2 divides the count source signal by n + 1 (n = 0 to 255). data can be read from timer 2 with the tab2 instruction. when reading the data, stop the counter and then execute the tab2 in- struction. the output from d 6 /cntr0 pin by timer 2 underflow signal divided by 2 can be controlled.
32 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (6) timer 3 (interrupt function) timer 3 is an 8-bit binary down counter with the timer 3 reload reg- ister (r3). data can be set simultaneously in timer 3 and the reload register (r3) with the t3ab instruction. data can be written to re- load register (r3) with the tr3ab instruction. when writing data to reload register r3 with the tr3ab instruction, the downcount after the underflow is started from the setting value of reload register r3. timer 3 starts counting after the following process; set data in timer 3, select the count source with the bits 0 and 1 of register w3, and a set the bit 3 of register w3 to 1. however, p3 1 /int1 pin input can be used as the start trigger for timer 3 count operation by setting the bit 2 of register w3 to 1. once count is started, when timer 3 underflows (the next count pulse is input after the contents of timer 3 becomes 0), the timer 3 interrupt request flag (t3f) is set to 1, new data is loaded from reload register r3, and count continues (auto-reload function). when a value set in reload register r3 is n, timer 3 divides the count source signal by n + 1 (n = 0 to 255). data can be read from timer 3 with the tab3 instruction. when reading the data, stop the counter and then execute the tab3 in- struction. timer 3 underflow signal divided by 2 can be output from d 7 /cntr1 pin. (7) timer 4 (interrupt function) timer 4 is an 8-bit binary down counter with the timer 4 reload reg- ister (r4). data can be set simultaneously in timer 4 and the reload register (r4) with the t4ab instruction. timer 4 starts counting after the following process; set data in timer 4, select the count source with the bits 0 and 1 of register w4, and a set the bit 3 of register w4 to 1. once count is started, when timer 4 underflows (the next count pulse is input after the contents of timer 4 becomes 0), the timer 4 interrupt request flag (t4f) is set to 1, new data is loaded from reload register r4, and count continues (auto-reload function). when a value set in reload register r4 is n, timer 4 divides the count source signal by n + 1 (n = 0 to 255). data can be read from timer 4 with the tab4 instruction. when reading the data, stop the counter and then execute the tab4 in- struction. the output from d 7 /cntr1 pin by timer 4 underflow signal divided by 2 can be controlled. (8) timer i/o pin (d 6 /cntr0, d 7 /cntr1) d 6 /cntr0 pin has functions to input the timer 2 count source, and to output the timer 1 and timer 2 underflow signals divided by 2. d 7 /cntr1 pin has functions to input the timer 4 count source, and to output the timer 3 and timer 4 underflow signals divided by 2. the selection of d 6 /cntr0 pin function can be controlled with the bit 0 of register w6. the selection of d 7 /cntr1 pin function can be controlled with the bit 2 of register w6. the following signals can be selected for the cntr0 output signal with the bit 1 of register w6. ? timer 1 underflow signal divided by 2 ? the signal of and operation between timer 1 underflow signal di- vided by 2 and timer 2 underflow signal divide by 2 the following signals can be selected for the cntr1 output signal with the bit 3 of register w6. ? timer 3 underflow signal divided by 2 ? the signal of and operation between timer 3 underflow signal di- vided by 2 and timer 4 underflow signal divide by 2 timer 2 counts the rising waveform of cntr0 input when the cntr0 input is selected as the count source. timer 4 counts the rising waveform of cntr1 input when the cntr1 input is selected as the count source. (9) timer interrupt request flags (t1f, t2f, t3f, and t4f) each timer interrupt request flag is set to 1 when each timer underflows. the state of these flags can be examined with the skip instructions (snzt1, snzt2, snzt3, and snzt4). use the interrupt control registers v1, v2 to select an interrupt or a skip instruction. an interrupt request flag is cleared to 0 when an interrupt occurs or when the next instruction is skipped with a skip instruction. (10) count start synchronization circuit (timer 1, timer 3) each timer 1 and timer 3 has the count start synchronization circuit which synchronize p3 0 /int0 pin and p3 1 /int1 pin, respectively, and can start the timer count operation. timer 1 count start synchronization circuit function is selected by setting the bit 0 of register w1 to 1. the control by p3 0 /int0 pin input can be performed by setting the bit 0 of register i1 to 1. p3 0 /int0 pin input level can be selected by the bit 2 of register i1 as follows; ? i1 2 = 0: the count start synchronizes the l level of p3 0 /int0 pin ? i1 2 = 1: the count start synchronizes the h level of p3 0 /int0 pin timer 3 count start synchronization circuit function is selected by setting the bit 2 of register w3 to 1. the control by p3 1 /int1 pin input can be performed by setting the bit 0 of register i2 to 1. p3 1 /int1 pin input level can be selected by the bit 2 of register i2 as follows; ? i2 2 = 0: the count start synchronizes the l level of p3 1 /int1 pin ? i2 2 = 1: the count start synchronizes the h level of p3 1 /int1 pin when timer 1 and timer 3 count start synchronization circuits are used, the count start synchronization circuits are set, the count source is input to each timer by inputting valid levels to p3 0 /int0 pin and p3 1 /int1 pin. once set, the count start synchronization cir- cuit is cleared by clearing the bit i1 0 or i2 0 to 0 or reset.
33 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. watchdog timer watchdog timer provides a method to reset the system when a pro- gram runs wild. watchdog timer consists of a 16-bit timer (wdt), watchdog timer enable flag (wef), and watchdog timer flags (wdf1, wdf2). the timer wdt downcounts the instruction clocks as the count source. the underflow signal is generated when the count value reaches 0000 16 . this underflow signal can be used as the timer 2 count source. when the wrst instruction is executed after system is released from reset, the wef flag is set to 1. at this time, the watchdog timer starts operating. when the count value of timer wdt reaches bfff 16 or 3fff 16 , the wdf1 flag is set to 1. if the wrst instruction is never ex- ecuted while timer wdt counts 32767, wdf2 flag is set to 1, and the reset pin outputs l level to reset the microcomputer. ex- ecute the wrst instruction at each period of 32766 machine cycle or less by software when using watchdog timer to keep the micro- computer operating normally. to prevent the wdt stopping in the event of misoperation, wef flag is designed not to initialize once the wrst instruction has been executed. note also that, if the wrst instruction is never ex- ecuted, the watchdog timer does not start. fig. 20 watchdog timer function the contents of wef, wdf1 and wdf2 flags and timer wdt are initialized at the ram back-up mode. if wdf2 flag is set to 1 at the same time that the microcomputer enters the ram back-up state, system reset may be performed. when using the watchdog timer and the ram back-up mode, ini- tialize the wdf1 flag with the wrst instruction just before the microcomputer enters the ram back-up state (refer to figure 21) fig. 21 program example to enter the ram back-up mode when using the watchdog timer wrst ; wdf1 flag reset pof epof ; pof instruction enabled (ram back-up state) oscillation stop ffff 16 0000 16 3fff 16 bfff 16 the value of timer (wdt) wdf1 flag wdf2 flag wrst instruction executed reset pin output system reset wrst instruction executed wef flag
34 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. serial i/o the 4513/4514 group has a built-in clock synchronous serial i/o which can serially transmit or receive 8-bit data. serial i/o consists of; ? serial i/o register si ? serial i/o mode register j1 ? serial i/o transmission/reception completion flag (siof) ? serial i/o counter registers a and b are used to perform data transfer with internal cpu, and the serial i/o pins are used for external data transfer. the pin functions of the serial i/o pins can be set with the register j1. table 11 serial i/o pins pin p2 0 /s ck p2 1 /s out p2 2 /s in pin function when selecting serial i/o clock i/o (s ck ) serial data output (s out ) serial data input (s in ) note: input ports p2 0 Cp2 2 can be used regardless of register j1. fig. 22 serial i/o structure table 12 serial i/o mode register j1 3 j1 2 j1 1 j1 0 serial i/o mode register j1 this bit has no function, but read/write is enabled. instruction clock signal divided by 8 instruction clock signal divided by 4 input ports p2 0 , p2 1 , p2 2 selected serial i/o ports s ck , s out , s in /input ports p2 0 , p2 1 , p2 2 selected external clock internal clock (instruction clock divided by 4 or 8) not used serial i/o internal clock dividing ratio selection bit serial i/o port selection bit serial i/o synchronous clock selection bit at reset : 0000 2 at ram back-up : state retained note: r represents read enabled, and w represents write enabled. 0 1 0 1 0 1 0 1 r/w j1 2 siof j1 2 j1 1 j1 0 j1 1 j1 0 msb 1/4 1/8 1 0 p2 1 /s out p2 2 /s in p2 0 /s ck tsiab tabsi s out s in s ck j1 3 mr 3 1 0 x in division circuit (divided by 2) internal clock generation circuit (divided by 3) instruction clock serial i/o mode register j1 serial i/o interrupt serial i/o counter (3) synchronous circuit register b (4) register a (4) serial i/o register si (8) lsb note: the output structure of s ck and s out pins is n-channel open-drain.
35 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. fig. 23 serial i/o register state when transferring (1) serial i/o register si serial i/o register si is the 8-bit data transfer serial/parallel conver- sion register. data can be set to register si through registers a and b with the tsiab instruction. the contents of register a is transmit- ted to the low-order 4 bits of register si, and the contents of register b is transmitted to the high-order 4 bits of register si. during transmission, each bit data is transmitted lsb first from the lowermost bit (bit 0) of register si, and during reception, each bit data is received lsb first to register si starting from the topmost bit (bit 7). when register si is used as a work register without using serial i/o, pull up the s ck pin or set the pin function to an input port p2 0 . (2) serial i/o transmission/reception completion flag (siof) serial i/o transmission/reception completion flag (siof) is set to 1 when serial data transmission or reception completes. the state of siof flag can be examined with the skip instruction (snzsi). use the interrupt control register v2 to select the inter- rupt or the skip instruction. the siof flag is cleared to 0 when the interrupt occurs or when the next instruction is skipped with the skip instruction. when transmitting (d 7 ? 0 : transfer data) when receiving d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 s in pin s out pin * s out pin s in pin serial i/o register (si) serial i/o register (si) d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 1 d 0 transfer data to be set transfer started transfer completed ******* ******** d 0 ******* ****** ******** d 7 d 6 d 5 d 4 d 3 d 2 ** d 7 d 6 d 5 d 4 d 3 d 2 d 1 * d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 (3) serial i/o start instruction (sst) when the sst instruction is executed, the siof flag is cleared to 0 and then serial i/o transmission/reception is started. (4) serial i/o mode register j1 register j1 controls the synchronous clock, p2 0 /s ck , p2 1 /s out and p2 2 /s in pin function. set the contents of this register through register a with the tj1a instruction. the taj1 instruction can be used to transfer the contents of register j1 to register a.
36 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (5) how to use serial i/o figure 24 shows the serial i/o connection example. serial i/o inter- rupt is not used in this example. in the actual wiring, pull up the wiring between each pin with a resistor. figure 25 shows the data transfer timing and table 13 shows the data transfer sequence. fig. 24 serial i/o connection example s out s rdy signal s ck s in d 5 s ck s out s in d 5 master (clock control) serial i/o interrupt enable bit (snzsi instruction is valid) interrupt control register v2 serial i/o mode register j1 serial i/o port s ck, s out, s in instruction clock divided by 8 or 4 selected as a transfer clock internal clock selected as a synchronous clock slave (external clock) 5 0 1 (bit 3) (bit 0) 1 5 5 0 1 55 55 this bit is not valid when j1 0 =? 5 : set an arbitrary value. (bit 3) (bit 0) (bit 3) (bit 0) (bit 3) (bit 0) 0 555 serial i/o interrupt enable bit (snzsi instruction is valid) interrupt control register v2 serial i/o port s ck, s out, s in external clock selected as a synchronous clock serial i/o mode register j1
37 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. fig. 25 timing of serial i/o data transfer s in s out sck s out s in s 0 s 7 ? 1 s 2 s 3 s 4 s 5 s 6 s 7 s 0 s 7 s 1 s 3 s 4 s 5 s 6 s 7 m 0 m 7 m 1 m 2 m 3 m 4 m 5 m 6 m 7 m 0 m 7 ? 1 m 2 m 3 m 4 m 5 m 6 m 7 s 2 m 0 ? 7 : the contents of master serial i/o s 0 ? 7 : the contents of slave serial i/o register rising of sck : serial input falling of sck : serial output master slave sst instruction sst instruction s rdy signal
38 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. table 13 processing sequence of data transfer from master to slave 1-byte data is serially transferred on this process. subsequently, data can be transferred continuously by repeating the process from *. when an external clock is selected as a synchronous clock, the clock is not controlled internally. control the clock externally be- cause serial transfer is performed as long as clock is externally input. (unlike an internal clock, an external clock is not stopped when serial transfer is completed.) however, the siof flag is set to 1 when the clock is counted 8 times after executing the sst in- struction. be sure to set the initial level of the external clock to h. master (transmission) [initial setting] ? setting the serial i/o mode register j1 and inter- rupt control register v2 shown in figure 24. tj1a and tv2a instructions ? setting the port received the reception enable signal (s rdy ) to the input mode. (port d 5 is used in this example) sd instruction * [transmission enable state] ? storing transmission data to serial i/o register si. tsiab instruction [transmission] ?check port d 5 is l level. szd instruction ?serial transfer starts. sst instruction ?check transmission completes. snzsi instruction ?wait (timing when continuously transferring) slave (reception) [initial setting] ? setting serial i/o mode register j1, and interrupt control register v2 shown in figure 24. tj1a and tv2a instructions ? setting the port received the reception enable signal (s rdy ) and outputting h level (reception impossible). (port d 5 is used in this example) sd instruction *[reception enable state] ? the siof flag is cleared to 0. sst instruction ? l level (reception possible) is output from port d 5 . rd instruction [reception] ? check reception completes. snzsi instruction ? h level is output from port d 5 . sd instruction [data processing]
39 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. a-d converter the 4513/4514 group has a built-in a-d conversion circuit that performs conversion by 10-bit successive comparison method. table 14 shows the characteristics of this a-d converter. this a- d converter can also be used as an 8-bit comparator to compare analog voltages input from the analog input pin with preset val- ues. table 14 a-d converter characteristics characteristics successive comparison method 10 bits linearity error: 2lsb non-linearity error: 0.9lsb 46.5 m s (high-speed mode at 4.0 mhz oscillation frequency) 4 for 4513 group 8 for 4514 group parameter conversion format resolution absolute accuracy conversion speed analog input pin fig. 26 a-d conversion circuit structure register a (4) v ss v dd iap4 (p4 0 p4 3 ) tabad 1/6 q2 3 register b (4) q1 1 q1 0 q1 2 tadab q2 2 q2 1 q2 0 0 1 4 4 4 4 8 8 8 01 1 8 10 q2 3 q2 3 dac operation signal 0 1 q2 3 8 8 2 tala q2 3 q1 3 taq1 tq1a taq2 tq2a adf (1) a in0 /cmp0- a in1 /cmp0+ a in2 /cmp1- a in3 /cmp1+ p4 0 /a in8 p4 1 /a in9 p4 2 /a in10 p4 3 /a in11 3 1 0 10 comparator 8-channel multi-plexed analog switch instruction clock a-d control circuit successive comparison register (ad) (10) a-d interrupt da converter ( note 1 ) comparator register (8) ( note 2 ) notes 1: this switch is turned on only when a-d converter is operating and generates the comparison voltage. 2: writing/reading data to the comparator register is possible only in the comparator mode (q2 3 =1). the value of the comparator register is retained even when the mode is switched to the a-d conversion mode (q2 3 =0) because it is separated from the successive comparison register (ad). also, the resolution in the comparator mode is 8 bits because the comparator register consists of 8 bits. 3: the 4513 group does not have ports p4 0 /a in4 ?4 3 /a in7 and the iap4 and op4a instructions. ( note 3 ) op4a (p4 0 p4 3 )
40 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. q1 3 q1 2 q1 1 q1 0 a-d control register q1 not used analog input pin selection bits (note 2) at reset : 0000 2 at ram back-up : state retained 0 1 q1 2 0 0 0 0 1 1 1 1 q1 1 0 0 1 1 0 0 1 1 this bit has no function, but read/write is enabled. selected pins a in0 a in1 a in2 a in3 a in4 (not available for the 4513 group) a in5 (not available for the 4513 group) a in6 (not available for the 4513 group) a in7 (not available for the 4513 group) at reset : 0000 2 q2 3 q2 2 q2 1 q2 0 a-d control register q2 a-d conversion mode comparator mode p4 3 , p4 2 (read/write enabled for the 4513 group) a in7 , a in6 /p4 3 , p4 2 (read/write enabled for the 4513 group) p4 1 (read/write enabled for the 4513 group) a in5 /p4 1 (read/write enabled for the 4513 group) p4 0 (read/write enabled for the 4513 group) a in4 /p4 0 (read/write enabled for the 4513 group) a-d operation mode selection bit p4 3 /a in7 and p4 2 /a in6 pin function selec- tion bit (not used for the 4513 group) p4 1 /a in5 pin function selection bit (not used for the 4513 group) p4 0 /a in4 pin function selection bit (not used for the 4513 group) at ram back-up : state retained 0 1 0 1 0 1 0 1 notes 1: r represents read enabled, and w represents write enabled. 2: select a in4 Ca in7 with register q1 after setting register q2. q1 0 0 1 0 1 0 1 0 1 (1) operating at a-d conversion mode the a-d conversion mode is set by setting the bit 3 of register q2 to 0. (2) successive comparison register ad register ad stores the a-d conversion result of an analog input in 10-bit digital data format. the contents of the high-order 8 bits of this register can be stored in register b and register a with the tabad instruction. the contents of the low-order 2 bits of this reg- ister can be stored into the high-order 2 bits of register a with the tala instruction. however, do not execute this instruction during a- d conversion. when the contents of register ad is n, the logic value of the com- parison voltage v ref generated from the built-in da converter can be obtained with the reference voltage v dd by the following for- mula: logic value of comparison voltage v ref v ref = 5 n n: the value of register ad (n = 0 to 1023) v dd 1024 (4) a-d conversion start instruction (adst) a-d conversion starts when the adst instruction is executed. the conversion result is automatically stored in the register ad. (5) a-d control register q1 register q1 is used to select one of analog input pins. the 4513 group does not have a in4 Ca in7 . accordingly, do not select these pins with register q1. (6) a-d control register q2 register q2 is used to select the pin function of p4 0 /a in4 , p4 1 / a in5 , p4 2 /a in6 , and p4 3 /a in7 . the a-d conversion mode is se- lected when the bit 3 of register q2 is 0, and the comparator mode is selected when the bit 3 of register q2 is 1. after set this register, select the analog input with register q1. even when register q2 is used to set the pins for analog input, p4 0 /a in4 Cp4 3 /a in7 continue to function as p4 0 Cp4 3 i/o. accord- ingly, when any of them are used as i/o port p4 and others are used as analog input pins, make sure to set the outputs of pins that are set for analog input to 1. also, for the port input, the port input function of the pin functions as analog input is undefined. r/w r/w table 15 a-d control registers (3) a-d conversion completion flag (adf) a-d conversion completion flag (adf) is set to 1 when a-d con- version completes. the state of adf flag can be examined with the skip instruction (snzad). use the interrupt control register v2 to select the interrupt or the skip instruction. the adf flag is cleared to 0 when the interrupt occurs or when the next instruction is skipped with the skip instruction.
41 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. table 16 change of successive comparison register ad during a-d conversion comparison voltage (v ref ) value change of successive comparison register ad at starting conversion (7) operation description a-d conversion is started with the a-d conversion start instruction (adst). the internal operation during a-d conversion is as follows: when a-d conversion starts, the register ad is cleared to 000 16 . next, the topmost bit of the register ad is set to 1, and the comparison voltage v ref is compared with the analog input volt- age v in . a when the comparison result is v ref < v in , the topmost bit of the register ad remains set to 1. when the comparison result is v ref > v in , it is cleared to 0. the 4513/4514 group repeats this operation to the lowermost bit of the register ad to convert an analog value to a digital value. a-d conversion stops after 62 machine cycles (46.5 m s when f(x in ) = 4.0 mhz in high-speed mode) from the start, and the conversion re- sult is stored in the register ad. an a-d interrupt activated condition is satisfied and the adf flag is set to 1 as soon as a-d conversion completes (figure 27). \ 1: 1st comparison result \ 3: 3rd comparison result \ 9: 9th comparison result \ 2: 2nd comparison result \ 8: 8th comparison result \ a: ath comparison result 1st comparison 2nd comparison 3rd comparison after 10th comparison completes 1 \ 1 \ 1 \ 1 ----- ----- ----- ----- 0 1 \ 2 \ 2 0 0 1 \ 3 0 0 0 \ 8 0 0 0 \ 9 0 0 0 \ a a-d conversion result v dd 2 v dd 2 v dd 2 v dd 2 v dd 4 v dd 4 v dd 8 v dd 1024 ------------- ------------- ------------- ------------- ------------- ------------- ------------- -------------
42 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. fig. 28 setting registers 0 55 1 (bit 3) (bit 0) a-d control register q2 a in4 function selected a-d conversion mode a-d control register q1 a in4 pin selected 5 100 (bit 3) (bit 0) 5 : set an arbitrary value (8) a-d conversion timing chart figure 27 shows the a-d conversion timing chart. fig. 27 a-d conversion timing chart (9) how to use a-d conversion how to use a-d conversion is explained using as example in which the analog input from p4 0 /a in4 pin is a-d converted, and the high- order 4 bits of the converted data are stored in address m(z, x, y) = (0, 0, 0), the middle-order 4 bits in address m(z, x, y) = (0, 0, 1), and the low-order 2 bits in address m(z, x, y) = (0, 0, 2) of ram. the a-d interrupt is not used in this example. after selecting the a in4 pin function with the bit 0 of the register q2, select a in4 pin and a-d conversion mode with the register q1 (refer to figure 28). execute the adst instruction and start a-d conversion. a examine the state of adf flag with the snzad instruction to de- termine the end of a-d conversion. ? transfer the low-order 2 bits of converted data to the high-order 2 bits of register a (tala instruction). ? transfer the contents of register a to m (z, x, y) = (0, 0, 2). ? transfer the high-order 8 bits of converted data to registers a and b (tabad instruction). ? transfer the contents of register a to m (z, x, y) = (0, 0, 1). ? transfer the contents of register b to register a, and then, store into m(z, x, y) = (0, 0, 0). adst instruction a-d conversion completion flag (adf) 62 machine cycles dac operation signal
43 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (10) operation at comparator mode the a-d converter is set to comparator mode by setting bit 3 of the register q2 to 1. below, the operation at comparator mode is described. (11) comparator register in comparator mode, the built-in da comparator is connected to the comparator register as a register for setting comparison voltages. the contents of register b is stored in the high-order 4 bits of the comparator register and the contents of register a is stored in the low-order 4 bits of the comparator register with the tadab instruc- tion. when changing from a-d conversion mode to comparator mode, the result of a-d conversion (register ad) is undefined. however, because the comparator register is separated from regis- ter ad, the value is retained even when changing from comparator mode to a-d conversion mode. note that the comparator register can be written and read at only comparator mode. if the value in the comparator register is n, the logic value of com- parison voltage v ref generated by the built-in da converter can be determined from the following formula: (12) comparison result store flag (adf) in comparator mode, the adf flag, which shows completion of a-d conversion, stores the results of comparing the analog input volt- age with the comparison voltage. when the analog input voltage is lower than the comparison voltage, the adf flag is set to 1. the state of adf flag can be examined with the skip instruction (snzad). use the interrupt control register v2 to select the inter- rupt or the skip instruction. the adf flag is cleared to 0 when the interrupt occurs or when the next instruction is skipped with the skip instruction. (13) comparator operation start instruction (adst instruction) in comparator mode, executing adst starts the comparator oper- ating. the comparator stops 8 machine cycles after it has started (6 m s at f(x in ) = 4.0 mhz in high-speed mode). when the analog input volt- age is lower than the comparison voltage, the adf flag is set to 1. (14) notes for the use of a-d conversion 1 note the following when using the analog input pins also for i/o port p4 functions: ? even when p4 0 /a in4 Cp4 3 /a in7 are set to pins for analog input, they continue to function as p4 0 Cp4 3 i/o. accordingly, when any of them are used as i/o port p4 and others are used as analog input pins, make sure to set the outputs of pins that are set for analog input to 1. also, the port input function of the pin func- tions as an analog input is undefined. ? tala instruction when the tala instruction is executed, the low-order 2 bits of register ad is transferred to the high-order 2 bits of register a, si- multaneously, the low-order 2 bits of register a is 0. logic value of comparison voltage v ref v ref = 5 n n: the value of register ad (n = 0 to 255) fig. 29 comparator operation timing chart v dd 256 adst instruction comparison result store flag(adf) 8 machine cycles dac operation signal comparator operation completed. ( th e v a l ue o f adf i s de t e rmin ed) ?
44 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (15) notes for the use of a-d conversion 2 do not change the operating mode (both a-d conversion mode and comparator mode) of a-d converter with bit 3 of register q2 while a-d converter is operating. when the operating mode of a-d converter is changed from the comparator mode to a-d conversion mode with the bit 3 of register q2, note the following; ? clear bit 2 of register v2 to 0 to change the operating mode of the a-d converter from the comparator mode to a-d conversion mode with the bit 3 of register q2. ? the a-d conversion completion flag (adf) may be set when the operating mode of the a-d converter is changed from the com- parator mode to the a-d conversion mode. accordingly, set a value to register q2, and execute the snzad instruction to clear the adf flag. (16) definition of a-d converter accuracy the a-d conversion accuracy is defined below (refer to figure 30). ? relative accuracy zero transition voltage (v 0t ) this means an analog input voltage when the actual a-d con- version output data changes from 0 to 1. full-scale transition voltage (v fst ) this means an analog input voltage when the actual a-d con- version output data changes from 1023 to 1022. a linearity error this means a deviation from the line between v 0t and v fst of a converted value between v 0t and v fst . ? differential non-linearity error this means a deviation from the input potential difference re- quired to change a converter value between v 0t and v fst by 1 lsb at the relative accuracy. ? absolute accuracy this means a deviation from the ideal characteristics between 0 to v dd of actual a-d conversion characteristics. fig. 30 definition of a-d conversion accuracy vn: analog input voltage when the output data changes from n to n+1 (n = 0 to 1022) ? 1lsb at relative accuracy ? (v) ? 1lsb at absolute accuracy ? (v) v fst Cv 0t 1022 v dd 1024 v dd v 1022 v n v 1 v 0 v n+1 n+1 n 1022 1023 1 0 b a c output data differential non-linearity error = linearity error = [lsb] c a bCa a [lsb] actual a-d conversion characteristics a: 1lsb by relative accuracy b: v n+1 Cv n c: difference between ideal v n and actual v n zero transition voltage (v 0t ) analog voltage full-scale transition voltage (v fst ) ideal line of a-d conversion between v 0 Cv 1022
45 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. voltage comparator the 4513/4514 group has 2 voltage comparator circuits that perform comparison of voltage between 2 pins. table 17 shows the characteristics of this voltage comparison. table 17 voltage comparator characteristics characteristics 2 circuits (cmp0, cmp1) cmp0-, cmp0+ (also used as a in0 , a in1 ) cmp1-, cmp1+ (also used as a in2 , a in3 ) 3.0 v to 5.5 v 0.3 v dd to 0.7 v dd typ. 20 mv, max.100 mv max. 20 m s parameter voltage comparator function input pin supply voltage input voltage comparison check error response time fig. 31 voltage comparator structure cmp0?a in0 cmp0+/a in1 cmp0 + cmp1?a in2 cmp1+/a in3 cmp1 + q3 3 q3 2 q3 1 q3 0 register a (4) tq3a taq3 voltage comparator control register q3 (4) note: bits 0 and 1 of register q3 can be only read.
46 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. voltage comparator control register q3 (note 2) at reset : 0000 2 at ram back-up : state retained q3 3 q3 2 q3 1 q3 0 voltage comparator (cmp1) invalid voltage comparator (cmp1) valid voltage comparator (cmp0) invalid voltage comparator (cmp0) valid cmp1- > cmp1+ cmp1- < cmp1+ cmp0- > cmp0+ cmp0- < cmp0+ voltage comparator (cmp1) control bit voltage comparator (cmp0) control bit cmp1 comparison result store bit cmp0 comparison result store bit 0 1 0 1 0 1 0 1 notes 1: r represents read enabled, and w represents write enabled. 2: bits 0 and 1 of register q3 can be only read. (1) voltage comparator control register q3 register q3 controls the function of the voltage comparator. the function of the voltage comparator cmp0 becomes valid by setting bit 2 of register q3 to 1, and becomes invalid by setting bit 2 of register q3 to 0. the comparison result of the voltage com- parator cmp0 is stored into bit 0 of register q3. the function of the voltage comparator cmp1 becomes valid by setting bit 3 of register q3 to 1, and becomes invalid by setting bit 3 of register q3 to 0. the comparison result of the voltage com- parator cmp1 is stored into bit 1 of register q3. (2) operation description of voltage comparator the voltage comparator function becomes valid by setting each control bit of register q3 to 1 and compares the voltage of the in- put pin. the comparison result is stored into each comparison result store bit of register q3. the comparison result is as follows; ? when cmp0- > cmp0+, q3 0 = 0 when cmp0- < cmp0+, q3 0 = 1 ? when cmp1- > cmp1+, q3 1 = 0 when cmp1- < cmp1+, q3 1 = 1 (3) precautions when the voltage comparator is used, note the following; ? voltage comparator function when the voltage comparator function is valid with the voltage comparator control register q3, it is operating even in the ram back-up mode. accordingly, be careful about such state because it causes the increase of the operation current in the ram back- up mode. in order to reduce the operation current in the ram back-up mode, invalidate (bits 2 and 3 of register q3 = 0) the voltage comparator function by software before the pof instruction is executed. also, while the voltage comparator function is valid, current is al- ways consumed by voltage comparator. on the system required for the low-power dissipation, invalidate the voltage comparator by software when it is unused. ? register q3 bits 0 and 1 of register q3 can be only read. note that they can- not be written. ? reading the comparison result of voltage comparator read the voltage comparator comparison result from register q3 after the voltage comparator response time (max. 20 m s) is passed from the voltage comparator function becomes valid. r/w table 18 voltage comparator control register q3
47 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. reset function system reset is performed by applying l level to reset pin for 1 machine cycle or more when the following condition is satisfied; the value of supply voltage is the minimum value or more of the recommended operating conditions. then when h level is applied to reset pin, software starts from address 0 in page 0. fig. 32 reset release timing fig. 33 reset pin input waveform and reset operation reset 0.3v dd 0.85v dd software starts (address 0 in page 0) f(x in ) is counted 16892 to 16895 times. ( note ) note: keep the value of supply voltage to the minimum value or more of the recommended operating conditions. reset input 1 machine cycle or more = f(x in ) reset software starts (address 0 in page 0) f(x in ) is counted 16892 to 16895 times. ( note ) note: it depends on the internal state of the microcomputer when reset is performed.
48 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (1) power-on reset reset can be performed automatically at power on (power-on re- set) by connecting resistors, a diode, and a capacitor to reset pin. connect reset pin and the external circuit at the shortest dis- tance. fig. 34 power-on reset circuit example (2) internal state at reset table 19 shows port state at reset, and figure 35 shows internal state at reset (they are the same after system is released from re- set). the contents of timers, registers, flags and ram except shown in figure 35 are undefined, so set the initial value to them. table 19 port state at reset name d 0 Cd 5 d 6 /cntr0, d 7 /cntr1 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 /s ck , p2 1 /s out , p2 2 /s in p3 0 /int0, p3 1 /int1 p3 2 , p3 3 (note 4) p4 0 /a in4 Cp4 3 /a in7 (note 4) p5 0 Cp5 3 (note 4) notes 1: output latch is set to 1. 2: pull-up transistor is turned off. 3: after system is released from reset, port p5 is in the input mode. (direction register fr0 = 0000 2 ) 4: the 4513 group does not have these ports. function d 0 Cd 5 d 6 , d 7 p0 0 Cp0 3 p1 0 Cp1 3 p2 0 Cp2 2 p3 0 , p3 1 p3 2 , p3 3 p4 0C p4 3 p5 0 Cp5 3 state high impedance (note) high impedance (notes 1, 2) high impedance high impedance (note 1) high impedance (note 1) high impedance (note 3) v dd reset pin wef ( note ) internal reset signal voltage drop detection circuit watchdog timer output v dd reset pin voltage power-on reset released internal reset signal reset state note: this symbol represents a parasitic diode. applied potential to reset pin must be v dd or less.
49 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. ? program counter (pc) ......................................................................................................... . address 0 in page 0 is set to program counter. ? interrupt enable flag (inte) ................................................................................................. . ? power down flag (p) .......................................................................................................... ... ? external 0 interrupt request flag (exf0) .............................................................................. ? external 1 interrupt request flag (exf1) .............................................................................. ? interrupt control register v1 ................................................................................................ .. ? interrupt control register v2 ................................................................................................ .. ? interrupt control register i1 ................................................................................................ ... ? interrupt control register i2 ................................................................................................ ... ? timer 1 interrupt request flag (t1f) ..................................................................................... ? timer 2 interrupt request flag (t2f) ..................................................................................... ? timer 3 interrupt request flag (t3f) ..................................................................................... ? timer 4 interrupt request flag (t4f) ..................................................................................... ? watchdog timer flags (wdf1, wdf2) .................................................................................. ? watchdog timer enable flag (wef) ...................................................................................... ? timer control register w1 .................................................................................................... . ? timer control register w2 .................................................................................................... . ? timer control register w3 .................................................................................................... . ? timer control register w4 .................................................................................................... . ? timer control register w6 .................................................................................................... . ? clock control register mr .................................................................................................... . ? serial i/o transmission/reception completion flag (siof) ................................................... ? serial i/o mode register j1 .................................................................................................. ? serial i/o register si ....................................................................................................... ...... ? a-d conversion completion flag (adf) ................................................................................. ? a-d control register q1 ...................................................................................................... ... ? a-d control register q2 ...................................................................................................... ... ? voltage comparator control register q3 ............................................................................... ? successive comparison register ad .................................................................................... ? comparator register .......................................................................................................... .... ? key-on wakeup control register k0 ...................................................................................... ? pull-up control register pu0 ................................................................................................. ? direction register fr0 ....................................................................................................... ... ? carry flag (cy) .............................................................................................................. ........ ? register a ................................................................................................................... .......... ? register b ................................................................................................................... .......... ? register d ................................................................................................................... .......... ? register e ................................................................................................................... .......... ? register x ................................................................................................................... .......... ? register y ................................................................................................................... .......... ? register z ................................................................................................................... .......... ? stack pointer (sp) ........................................................................................................... ..... 5 represents undefined. fig. 35 internal state at reset 00000000000000 0 (interrupt disabled) 0 0 0 0 0 0 0 (interrupt disabled) 0 0 0 0 (interrupt disabled) 0000 0000 0 0 0 0 0 0 0 0 0 0 (prescaler and timer 1 stopped) 0 0 0 0 (timer 2 stopped) 0 0 0 0 (timer 3 stopped) 0 0 0 0 (timer 4 stopped) 0000 1000 0 0000 555555 0 0000 0000 0000 555555 555555 0000 0000 0 0 0 0 (port p5: input mode) 0 0000 0000 555 555555 0000 0000 55 111 55 5555 55 55 (external clock selected and serial i/o port not selected)
50 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. voltage drop detection circuit the built-in voltage drop detection circuit is designed to detect a drop in voltage and to reset the microcomputer if the supply voltage drops below a set value. fig. 37 voltage drop detection circuit operation waveform fig. 36 voltage drop detection reset circuit voltage drop detection circuit internal reset signal reset pin watchdog timer output wef note: the output structure of reset pin is n-channel open-drain. v dd v rst (detection voltage) voltage drop detection circuit output the microcomputer starts operation after f(x in ) is counted 16892 to 16895 times. reset pin notes 1: pull-up reset pin externally. 2: refer to the voltage drop detection circuit in the electrical characteristics for the rating value of v rst (detection voltage).
51 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. ram back-up mode the 4513/4514 group has the ram back-up mode. when the epof and pof instructions are executed continuously, system enters the ram back-up state. the pof instruction is equal to the nop instruction when the epof instruction is not ex- ecuted before the pof instruction. as oscillation stops retaining ram, the function of reset circuit and states at ram back-up mode, current dissipation can be reduced without losing the contents of ram. table 20 shows the function and states retained at ram back-up. figure 38 shows the state transition. (1) identification of the start condition warm start (return from the ram back-up state) or cold start (re- turn from the normal reset state) can be identified by examining the state of the power down flag (p) with the snzp instruction. (2) warm start condition when the external wakeup signal is input after the system enters the ram back-up state by executing the epof and pof instruc- tions continuously, the cpu starts executing the program from address 0 in page 0. in this case, the p flag is 1. (3) cold start condition the cpu starts executing the program from address 0 in page 0 when; ? reset pulse is input to reset pin, or ? reset by watchdog timer is performed, or ? voltage drop detection circuit detects the voltage drop. in this case, the p flag is 0. table 20 functions and states retained at ram back-up function program counter (pc), registers a, b, carry flag (cy), stack pointer (sp) (note 2) contents of ram port level timer control register w1 timer control registers w2 to w4, w6 clock control register mr interrupt control registers v1, v2 interrupt control registers i1, i2 timer 1 function timer 2 function timer 3 function timer 4 function a-d conversion function a-d control registers q1, q2 voltage comparator function voltage comparator control register q3 serial i/o function serial i/o mode register j1 pull-up control register pu0 key-on wakeup control register k0 direction register fr0 external 0 interrupt request flag (exf0) external 1 interrupt request flag (exf1) timer 1 interrupt request flag (t1f) timer 2 interrupt request flag (t2f) timer 3 interrupt request flag (t3f) timer 4 interrupt request flag (t4f) watchdog timer flags (wdf1, wdf2) watchdog timer enable flag (wef) 16-bit timer (wdt) a-d conversion completion flag (adf) serial i/o transmission/reception completion flag (siof) interrupt enable flag (inte) ram back-up 5 o o 5 o 5 5 o 5 (note 3) (note 3) (note 3) 5 o o (note 5) o 5 o o o o 5 5 5 (note 3) (note 3) (note 3) 5 (note 4) 5 (note 4) 5 (note 4) 5 5 5 notes 1: o represents that the function can be retained, and 5 repre- sents that the function is initialized. registers and flags other than the above are undefined at ram back-up, and set an initial value after returning. 2: the stack pointer (sp) points the level of the stack register and is initialized to 7 at ram back-up. 3: the state of the timer is undefined. 4: initialize the watchdog timer with the wrst instruction, and then execute the pof instruction. 5: the state is retained when the voltage comparator function is se- lected with the voltage comparator control register q3.
52 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (4) return signal an external wakeup signal is used to return from the ram back-up mode because the oscillation is stopped. table 21 shows the return condition for each return source. (5) ports p0 and p1 control registers ? key-on wakeup control register k0 register k0 controls the ports p0 and p1 key-on wakeup func- tion. set the contents of this register through register a with the tk0a instruction. in addition, the tak0 instruction can be used to transfer the contents of register k0 to register a. ? pull-up control register pu0 register pu0 controls the on/off of the ports p0 and p1 pull-up transistor. set the contents of this register through register a with the tpu0a instruction. in addition, the tapu0 instruction can be used to transfer the contents of register pu0 to register a. table 21 return source and return condition remarks set the port using the key-on wakeup function selected with register k0 to h level before going into the ram back-up state because the port p0 shares the falling edge detection circuit with port p1. select the return level (l level or h level) with the bit 2 of register i1 ac- cording to the external state before going into the ram back-up state. select the return level (l level or h level) with the bit 2 of register i2 ac- cording to the external state before going into the ram back-up state. return condition return by an external falling edge input (h ? l). return by an external h level or l level input. the exf0 flag is not set. return by an external h level or l level input. the exf1 flag is not set. external wakeup signal return source ports p0, p1 port p3 0 /int0 port p3 1 /int1
53 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. fig. 38 state transition fig. 39 set source and clear source of the p flag fig. 40 start condition identified example using the snzp in- struction s r q power down flag p pof instruction reset input or voltage drop detection circuit output l set source pof instruction is executed l clear source reset input ??? ? ?? ? software start p = ? ? yes warm start cold start no : time required to stabilize the f(x in ) oscillation is automatically generated by hardware. stabilizing time a pof instruction is executed a f(x in ) oscillation return input (stabilizing time a ) b (ram back-up mode) f(x in ) stop reset (stabilizing time a )
54 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. table 22 key-on wakeup control register, pull-up control register, and interrupt control register k0 3 k0 2 k0 1 k0 0 key-on wakeup control register k0 pu0 3 pu0 2 pu0 1 pu0 0 key-on wakeup not used key-on wakeup used key-on wakeup not used key-on wakeup used key-on wakeup not used key-on wakeup used key-on wakeup not used key-on wakeup used pins p1 2 and p1 3 key-on wakeup control bit pins p1 0 and p1 1 key-on wakeup control bit pins p0 2 and p0 3 key-on wakeup control bit pins p0 0 and p0 1 key-on wakeup control bit at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on pins p1 2 and p1 3 pull-up transistor control bit pins p1 0 and p1 1 pull-up transistor control bit pins p0 2 and p0 3 pull-up transistor control bit pins p0 0 and p0 1 pull-up transistor control bit r/w pull-up control register pu0 at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w i1 3 i1 2 i1 1 i1 0 i2 3 i2 2 i2 1 i2 0 not used interrupt valid waveform for int0 pin/ return level selection bit (note 2) int0 pin edge detection circuit control bit int0 pin timer 1 control enable bit this bit has no function, but read/write is enabled. falling waveform (l level of int1 pin is recognized with the snzi1 instruction)/l level rising waveform (h level of int1 pin is recognized with the snzi1 instruction)/h level one-sided edge detected both edges detected disabled enabled not used interrupt valid waveform for int1 pin/ return level selection bit (note 3) int1 pin edge detection circuit control bit int1 pin timer 3 control enable bit notes 1: r represents read enabled, and w represents write enabled. 2: when the contents of i1 2 is changed, the external interrupt request flag exf0 may be set. accordingly, clear exf0 flag with the snz0 instruction. 3: when the contents of i2 2 is changed, the external interrupt request flag exf1 may be set. accordingly, clear exf1 flag with the snz1 instruction. interrupt control register i1 r/w at ram back-up : state retained at reset : 0000 2 this bit has no function, but read/write is enabled. falling waveform (l level of int0 pin is recognized with the snzi0 instruction)/l level rising waveform (h level of int0 pin is recognized with the snzi0 instruction)/h level one-sided edge detected both edges detected disabled enabled 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 interrupt control register i2 r/w at ram back-up : state retained at reset : 0000 2
55 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. clock control the clock control circuit consists of the following circuits. ? system clock generating circuit ? control circuit to stop the clock oscillation fig. 41 clock control circuit structure table 23 clock control register mr note : r represents read enabled, and w represents write enabled. ? control circuit to switch the middle-speed mode and high-speed mode ? control circuit to return from the ram back-up state mr 3 mr 2 mr 1 mr 0 clock control register mr f(x in ) (high-speed mode) f(x in )/2 (middle-speed mode) this bit has no function, but read/write is enabled. this bit has no function, but read/write is enabled. this bit has no function, but read/write is enabled. system clock selection bit not used not used not used at reset : 1000 2 at ram back-up : 1000 2 0 1 0 1 0 1 0 1 r/w instruction clock mr 3 1 0 reset falling detected ports p0 0 , p0 1 ports p0 2 , p0 3 ports p1 0 , p1 1 ports p1 2 , p1 3 multi- plexer k0 0 ,k0 1 ,k0 2 ,k0 3 counter wait time (note) control circuit software start signal r s q pof instruction x in x out i1 2 0 ??level 1 p3 0 /int 0 key-on wake up control register i2 2 0 1 p3 1 /int 1 oscillation circuit division circuit (divided by 2) internal clock generation circuit (divided by 3) ??level ??level ??level note: the wait time control circuit is used to generate the time required to stabilize the f(x in ) oscillation. system clock
56 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. clock signal f(x in ) is obtained by externally connecting a ceramic resonator. connect this external circuit to pins x in and x out at the shortest distance. a feedback resistor is built in between pins x in and x out . when an external clock signal is input, connect the clock source to x in and leave x out open. when using an external clock, the maxi- mum value of external clock oscillating frequency is shown in table 24. table 24 maximum value of external clock oscillation frequency supply voltage v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v oscillation frequency (duty ratio) 3.0 mhz (40 % to 60 %) 3.0 mhz (40 % to 60 %) 1.0 mhz (40 % to 60 %) 0.8 mhz (40 % to 60 %) 3.0 mhz (40 % to 60 %) 3.0 mhz (40 % to 60 %) 1.0 mhz (40 % to 60 %) rom ordering method please submit the information described below when ordering mask rom. (1) mask rom order confirmation form ..................................... 1 (2) data to be written into mask rom ............................... eprom (three sets containing the identical data) (3) mark specification form .......................................................... 1 fig. 42 ceramic resonator external circuit fig. 43 external clock input circuit note: externally connect a damping resistor rd de- pending on the oscillation frequency. (a feedback resistor is built-in.) use the resonator manu- facturers recommended value because constants such as capacitance de- pend on the resonator. mask rom version one time prom version 4513/4514 x in x out rd c in c out 4513/4514 x in x out external oscillation circuit v dd v ss middle-speed mode high-speed mode middle-speed mode high-speed mode
57 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. list of precautions noise and latch-up prevention connect a capacitor on the following condition to prevent noise and latch-up; ? connect a bypass capacitor (approx. 0.1 m f) between pins v dd and v ss at the shortest distance, ? equalize its wiring in width and length, and ? use relatively thick wire. in the one time prom version, cnv ss pin is also used as v pp pin. accordingly, when using this pin, connect this pin to v ss through a resistor about 5 k w in series at the shortest distance. prescaler stop the prescaler operation to change its frequency dividing ra- tio. a timer count source stop timer 1, 2, 3, or 4 counting to change its count source. ? reading the count value stop timer 1, 2, 3, or 4 counting and then execute the tab1, tab2, tab3, or tab4 instruction to read its data. ? writing to reload registers r1 and r3 when writing data to reload registers r1 or r3 while timer 1 or timer 3 is operating, avoid a timing when timer 1 or timer 3 underflows. ? p3 0 /int0 pin when the interrupt valid waveform of the p3 0 /int0 pin is changed with the bit 2 of register i1 in software, be careful about the following notes. ? clear the bit 0 of register v1 to 0 before the interrupt valid wave- form of p3 0 /int0 pin is changed with the bit 2 of register i1 (refer to figure 44 ). ? depending on the input state of the p3 0 /int0 pin, the external 0 interrupt request flag (exf0) may be set when the interrupt valid waveform is changed. accordingly, clear bit 2 of register i1, and execute the snz0 instruction to clear the exf0 flag after execut- ing at least one instruction (refer to figure 44 ) fig. 45 external 1 interrupt program example ? one time prom version the operating power voltage of the one time prom version is 2.5 v to 5.5 v. multifunction the input of d 6 , d 7 , p2 0 Cp2 2 , i/o of p3 0 and p3 1 , input of cmp0-, cmp0+, cmp1-, cmp1+, and i/o of p4 0 Cp4 3 can be used even when cntr0, cntr1, s ck , s out , s in , int0, int1, a in0 Ca in3 and a in4 Ca in7 are selected. ? p3 1 /int1 pin when the interrupt valid waveform of p3 1 /int1 pin is changed with the bit 2 of register i2 in software, be careful about the fol- lowing notes. ? clear the bit 1 of register v1 to 0 before the interrupt valid wave- form of p3 1 /int1 pin is changed with the bit 2 of register i2 (refer to figure 45 a ). ? depending on the input state of the p3 1 /int1 pin, the external 1 interrupt request flag (exf1) may be set when the interrupt valid waveform is changed. accordingly, clear bit 2 of register i2 and execute the snz1 instruction to clear the exf1 flag after execut- ing at least one instruction (refer to figure 45 ? ). la 8 ; ( 55 0 5 2 ) tv1a ; the snz1 instruction is valid ........... a la 8 ti2a ; change of the interrupt valid waveform nop ........................................................... ? snz1 ; the snz1 instruction is executed nop 5 : this bit is not related to the setting of int1. . . . . . . la 4 ; ( 555 0 2 ) tv1a ; the snz0 instruction is valid ........... la 4 ; ti1a ; interrupt valid waveform is changed nop ........................................................... snz0 ; the snz0 instruction is executed nop 5 : this bit is not related to the setting of int0 pin. . . . . . . fig. 44 external 0 interrupt program example
58 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. a-d converter-1 when the operating mode of the a-d converter is changed from the comparator mode to the a-d conversion mode with the bit 3 of register q2 in a program, be careful about the following notes. ? clear the bit 2 of register v2 to 0 to change the operating mode of the a-d converter from the comparator mode to the a-d con- version mode with the bit 3 of register q2 (refer to figure 46 ? ). ? the a-d conversion completion flag (adf) may be set when the operating mode of the a-d converter is changed from the com- parator mode to the a-d conversion mode. accordingly, set a value to register q2, and execute the snzad instruction to clear the adf flag. do not change the operating mode (both a-d conversion mode and comparator mode) of a-d converter with the bit 3 of register q2 during operating the a-d converter. . . . la 8 ; ( 5 0 55 2 ) tv2a ; the snzad instruction is valid ........ ? la 0 ; (0 555 2 ) tq2a ; change of the operating mode of the a-d converter from the comparator mode to the a-d conversion mode snzad nop . . . fig. 47 analog input external circuit example-1 fig. 48 analog input external circuit example-2 pof instruction execute the pof instruction immediately after executing the epof instruction to enter the ram back-up. note that system cannot enter the ram back-up state when ex- ecuting only the pof instruction. be sure to disable interrupts by executing the di instruction be- fore executing the epof instruction. analog input pins note the following when using the analog input pins also for i/o port p4 functions: ? even when p4 0 /a in4 Cp4 3 /a in7 are set to pins for analog input, they continue to function as p4 0 Cp4 3 i/o. accordingly, when any of them are used as i/o port p4 and others are used as analog input pins, make sure to set the outputs of pins that are set for analog input to 1. also, the port input function of the pin func- tions as an analog input is undefined. ? tala instruction when the tala instruction is executed, the low-order 2 bits of register ad is transferred to the high-order 2 bits of register a, si- multaneously, the low-order 2 bits of register a is 0. program counter make sure that the pc h does not specify after the last page of the built-in rom. port p3 in the 4513 group, when the iap3 instruction is executed, note that the high-order 2 bits of register a is undefined. a-d converter-2 each analog input pin is equipped with a capacitor which is used to compare the analog voltage. accordingly, when the analog voltage is input from the circuit with high-impedance and, charge/ discharge noise is generated and the sufficient a-d accuracy may not be obtained. therefore, reduce the impedance or, con- nect a capacitor (0.01 m f to 1 m f) to analog input pins (figure 47). when the overvoltage applied to the a-d conversion circuit may occur, connect an external circuit in order to keep the voltage within the rated range as shown the figure 48. in addition, test the application products sufficiently. 5 : this bit is not related to the change of the operating mode of the a-d conversion. fig. 46 a-d converter operating mode program example 11 sensor a in apply the voltage withiin the specifications to an analog input pin. sensor a in about 1k w 12 13 14 15
59 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 16 voltage comparator function when the voltage comparator function is valid with the voltage comparator control register q3, it is operating even in the ram back-up mode. accordingly, be careful about such state because it causes the increase of the operation current in the ram back- up mode. in order to reduce the operation current in the ram back-up mode, invalidate (bits 2 and 3 of register q3 = 0) the voltage comparator function by software before the pof instruction is ex- ecuted. also, while the voltage comparator function is valid, current is al- ways consumed by voltage comparator. on the system required for the low-power dissipation, invalidate the voltage comparator when it is unused by software. register q3 bits 0 and 1 of register q3 can be only read. note that they can- not be written. reading the comparison result of voltage comparator read the voltage comparator comparison result from register q3 after the voltage comparator response time (max. 20 m s) is passed from the voltage comparator function become valid. 17 18
60 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. symbol the symbols shown below are used in the following instruction function table and instruction list. symbol a b dr e q1 q2 q3 ad j1 si v1 v2 i1 i2 w1 w2 w3 w4 w6 mr k0 pu0 fr0 x y z dp pc pc h pc l sk sp cy r1 r2 r3 r4 t1 t2 t3 t4 contents register a (4 bits) register b (4 bits) register d (3 bits) register e (8 bits) a-d control register q1 (4 bits) a-d control register q2 (4 bits) voltage comparator control register q3 (4 bits) successive comparison register ad (10 bits) serial i/o mode register j1 (4 bits) serial i/o register si (8 bits) interrupt control register v1 (4 bits) interrupt control register v2 (4 bits) interrupt control register i1 (4 bits) interrupt control register i2 (4 bits) timer control register w1 (4 bits) timer control register w2 (4 bits) timer control register w3 (4 bits) timer control register w4 (4 bits) timer control register w6 (4 bits) clock control register mr (4 bits) key-on wakeup control register k0 (4 bits) pull-up control register pu0 (4 bits) direction register fr0 (4 bits) register x (4 bits) register y (4 bits) register z (2 bits) data pointer (10 bits) (it consists of registers x, y, and z) program counter (14 bits) high-order 7 bits of program counter low-order 7 bits of program counter stack register (14 bits 5 8) stack pointer (3 bits) carry flag timer 1 reload register timer 2 reload register timer 3 reload register timer 4 reload register timer 1 timer 2 timer 3 timer 4 contents timer 1 interrupt request flag timer 2 interrupt request flag timer 3 interrupt request flag timer 4 interrupt request flag watchdog timer flag watchdog timer enable flag interrupt enable flag external 0 interrupt request flag external 1 interrupt request flag power down flag a-d conversion completion flag serial i/o transmission/reception completion flag port d (8 bits) port p0 (4 bits) port p1 (4 bits) port p2 (3 bits) port p3 (4 bits) port p4 (4 bits) port p5 (4 bits) hexadecimal variable hexadecimal variable hexadecimal variable hexadecimal variable hexadecimal constant hexadecimal constant hexadecimal constant binary notation of hexadecimal variable a (same for others) direction of data movement data exchange between a register and memory decision of state shown before ? contents of registers and memories negate, flag unchanged after executing instruction ram address pointed by the data pointer label indicating address a 6 a 5 a 4 a 3 a 2 a 1 a 0 label indicating address a 6 a 5 a 4 a 3 a 2 a 1 a 0 in page p 5 p 4 p 3 p 2 p 1 p 0 hex. c + hex. number x (also same for others) symbol t1f t2f t3f t4f wdf1 wef inte exf0 exf1 p adf siof d p0 p1 p2 p3 p4 p5 x y z p n i j a 3 a 2 a 1 a 0 ? ? ? ( ) m(dp) a p, a c + x note : the 4513/4514 group just invalidates the next instruction when a skip is performed. the contents of program counter is no t increased by 2. accord- ingly, the number of cycles does not change even if skip is not performed. however, the cycle count becomes 1 if the tabp p, rt, or rts instruction is skipped.
61 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. list of instruction function group- ing ram addresses function (mj(dp)) ? 1 j = 0 to 3 (mj(dp)) ? 0 j = 0 to 3 (mj(dp)) = 0 ? j = 0 to 3 (a) = (m(dp)) ? (a) = n ? n = 0 to 15 (pc l ) ? a 6 Ca 0 (pc h ) ? p (pc l ) ? a 6 Ca 0 (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? 2 (pc l ) ? a 6 Ca 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? a 6 Ca 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 comparison operation subroutine operation branch operation bit operation return operation mnemonic sb j rb j szb j seam sea n b a bl p, a bla p bm a bml p, a bmla p rti rt rts mnemonic xami j tma j la n tabp p am amc a n and or sc rc szc cma rar function (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) + 1 (m(dp)) ? (a) (x) ? (x)exor(j) j = 0 to 15 (a) ? n n = 0 to 15 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (b) ? (rom(pc)) 7 C 4 (a) ? (rom(pc)) 3 C 0 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (a) ? (a) + (m(dp)) (a) ? (a) + (m(dp)) + (cy) (cy) ? carry (a) ? (a) + n n = 0 to 15 (a) ? (a) and (m(dp)) (a) ? (a) or (m(dp)) (cy) ? 1 (cy) ? 0 (cy) = 0 ? (a) ? (a) ? cy ? a 3 a 2 a 1 a 0 mnemonic tab tba tay tya teab tabe tda tad taz tax tasp lxy x, y lz z iny dey tam j xam j xamd j function (a) ? (b) (b) ? (a) (a) ? (y) (y) ? (a) (e 7 Ce 4 ) ? (b) (e 3 Ce 0 ) ? (a) (b) ? (e 7 Ce 4 ) (a) ? (e 3 Ce 0 ) (dr 2 Cdr 0 ) ? (a 2 Ca 0 ) (a 2 Ca 0 ) ? (dr 2 Cdr 0 ) (a 3 ) ? 0 (a 1 , a 0 ) ? (z 1 , z 0 ) (a 3 , a 2 ) ? 0 (a) ? (x) (a 2 Ca 0 ) ? (sp 2 Csp 0 ) (a 3 ) ? 0 (x) ? x, x = 0 to 15 (y) ? y, y = 0 to 15 (z) ? z, z = 0 to 3 (y) ? (y) + 1 (y) ? (y) C 1 (a) ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) C 1 ram to register transfer arithmetic operation ram to register transfer register to register transfer group- ing group- ing
62 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. list of instruction function (continued) function (t1f) = 1 ? after skipping (t1f) ? 0 (t2f) = 1 ? after skipping (t2f) ? 0 (t3f) = 1 ? after skipping (t3f) ? 0 (t4f) = 1 ? after skipping (t4f) ? 0 (a) ? (p0) (p0) ? (a) (a) ? (p1) (p1) ? (a) (a 2 Ca 0 ) ? (p2 2 Cp2 0 ) (a 3 ) ? 0 (a) ? (p3) (p3) ? (a) (a) ? (p4) (p4) ? (a) (a) ? (p5) (p5) ? (a) (d) ? 1 (d(y)) ? 0 (y) = 0 to 7 (d(y)) ? 1 (y) = 0 to 7 (d(y)) = 0 ? (y) = 0 to 7 mnemonic snzt1 snzt2 snzt3 snzt4 iap0 op0a iap1 op1a iap2 iap3 op3a iap4* op4a* iap5* op5a* cld rd sd szd input/output operation function (a) ? (w4) (w4) ? (a) (a) ? (w6) (w6) ? (a) (b) ? (t1 7 Ct1 4 ) (a) ? (t1 3 Ct1 0 ) (r1 7 Cr1 4 ) ? (b) (t1 7 Ct1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (t1 3 Ct1 0 ) ? (a) (b) ? (t2 7 Ct2 4 ) (a) ? (t2 3 Ct2 0 ) (r2 7 Cr2 4 ) ? (b) (t2 7 Ct2 4 ) ? (b) (r2 3 Cr2 0 ) ? (a) (t2 3 Ct2 0 ) ? (a) (b) ? (t3 7 Ct3 4 ) (a) ? (t3 3 Ct3 0 ) (r3 7 Cr3 4 ) ? (b) (t3 7 Ct3 4 ) ? (b) (r3 3 Cr3 0 ) ? (a) (t3 3 Ct3 0 ) ? (a) (b) ? (t4 7 Ct4 4 ) (a) ? (t4 3 Ct4 0 ) (r4 7 Cr4 4 ) ? (b) (t4 7 Ct4 4 ) ? (b) (r4 3 Cr4 0 ) ? (a) (t4 3 Ct4 0 ) ? (a) (r1 7 Cr1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (r3 7 Cr3 4 ) ? (b) (r3 3 Cr3 0 ) ? (a) mnemonic taw4 tw4a taw6 tw6a tab1 t1ab tab2 t2ab tab3 t3ab tab4 t4ab tr1ab tr3ab function (inte) ? 0 (inte) ? 1 (exf0) = 1 ? after skipping (exf0) ? 0 (exf1) = 1 ? after skipping (exf1) ? 0 i1 2 = 1 : (int0) = h ? i1 2 = 0 : (int0) = l ? i2 2 = 1 : (int1) = h ? i2 2 = 0 : (int1) = l ? (a) ? (v1) (v1) ? (a) (a) ? (v2) (v2) ? (a) (a) ? (i1) (i1) ? (a) (a) ? (i2) (i2) ? (a) (a) ? (w1) (w1) ? (a) (a) ? (w2) (w2) ? (a) (a) ? (w3) (w3) ? (a) mnemonic di ei snz0 snz1 snzi0 snzi1 tav1 tv1a tav2 tv2a tai1 ti1a tai2 ti2a taw1 tw1a taw2 tw2a taw3 tw3a group- ing timer operation interrupt operation timer operation group- ing group- ing timer operation *: the 4513 group does not have these instructions.
63 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. list of instruction function (continued) mnemonic tk0a tak0 tpu0a tapu0 tfr0a* tabsi tsiab taj1 tj1a sst snzsi function (k0) ? (a) (a) ? (k0) (pu0) ? (a) (a) ? (pu0) (fr0) ? (a) (a) ? (si 3 Csi 0 ) (b) ? (si 7 Csi 4 ) (si 3 Csi 0 ) ? (a) (si 7 Csi 4 ) ? (b) (a) ? (j1) (j1) ? (a) (siof) ? 0 serial i/o starting (siof) = 1 ? after skipping (siof) ? 0 mnemonic tabad tala tadab taq1 tq1a adst snzad taq2 tq2a nop pof epof snzp wrst tamr tmra taq3 tq3a function (a) ? (ad 5 Cad 2 ) (b) ? (ad 9 Cad 6 ) however, in the com- parator mode, (a) ? (ad 3 Cad 0 ) (b) ? (ad 7 Cad 4 ) (a) ? (ad 1 , ad 0 , 0, 0) (ad 3 Cad 0 ) ? (a) (ad 7 Cad 4 ) ? (b) (a) ? (q1) (q1) ? (a) (adf) ? 0 a-d conversion starting (adf) = 1 ? after skipping (adf) ? 0 (a) ? (q2) (q2) ? (a) (pc) ? (pc) + 1 ram back-up pof instruction valid (p) = 1 ? (wdf1) ? 0, (wef) ? 1 (a) ? (mr) (mr) ? (a) (a) ? (q3) (q3 3 , q3 2 ) ? (a 3 , a 2 ) (q3 1 ) ? (cmp1 com- parison result) (q3 0 ) ? (cmp0 com- parison result) serial i/o control operation input/output operation other operation a-d conversion operation *: the 4513 group does not have these instructions. group- ing group- ing
64 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. instruction code table (for 4513 group) d 3 Cd 0 hex. notation 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 a b c d e f d 9 Cd 4 00 nop C pof snzp di ei rc sc C C am amc tya C tba C 000001 01 bla cld C iny rd sd C dey and or teab C cma rar tab tay 000010 02 szb 0 szb 1 szb 2 szb 3 szd sean seam C C tda tabe C C C C szc 000011 03 bmla C C C C C C C snz0 snz1 snzi0 snzi1 C C tv2a tv1a 000100 04 C C C C rt rts rti C lz 0 lz 1 lz 2 lz 3 rb 0 rb 1 rb 2 rb 3 000101 05 tasp tad tax taz tav1 tav2 C C C C C epof sb 0 sb 1 sb 2 sb 3 000110 06 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 000111 07 la 0 la 1 la 2 la 3 la 4 la 5 la 6 la 7 la 8 la 9 la 10 la 11 la 12 la 13 la 14 la 15 001000 08 tabp 0 tabp 1 tabp 2 tabp 3 tabp 4 tabp 5 tabp 6 tabp 7 tabp 8 tabp 9 tabp 10 tabp 11 tabp 12 tabp 13 tabp 14 tabp 15 001001 09 tabp 16*** tabp 17*** tabp 18*** tabp 19*** tabp 20*** tabp 21*** tabp 22*** tabp 23*** tabp 24*** tabp 25*** tabp 26*** tabp 27*** tabp 28*** tabp 29*** tabp 30*** tabp 31*** 001010 0a 001011 0b 001100 0c 001101 0d 001110 0e 001111 0f bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bml*** bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bl*** bm bm bm bm bm bm bm bm bm bm bm bm bm bm bm bm 010000 010111 011000 011111 18C1f b b b b b b b b b b b b b b b b bl bml bla bmla sea szd the second word 10 paaa aaaa 10 paaa aaaa 10 pp00 pppp 10 pp00 pppp 00 0111 nnnn 00 0010 1011 tabp 32** tabp 33** tabp 34** tabp 35** tabp 36** tabp 37** tabp 38** tabp 39** tabp 40** tabp 41** tabp 42** tabp 43** tabp 44** tabp 45** tabp 46** tabp 47** tabp 48* tabp 49* tabp 50* tabp 51* tabp 52* tabp 53* tabp 54* tabp 55* tabp 56* tabp 57* tabp 58* tabp 59* tabp 60* tabp 61* tabp 62* tabp 63* ? *, **, and *** cannot be used in the m34513m2-xxxsp/fp. ? * and ** cannot be used in the m34513m4-xxxsp/fp. ? * and ** cannot be used in the m34513e4fp. ? * cannot be used in the m34513m6-xxxfp. 10C17 000000 the above table shows the relationship between machine language codes and machine language instructions. d 3 Cd 0 show the low-order 4 bits of the machine language code, and d 9 Cd 4 show the high-order 6 bits of the machine language code. the hexadecimal representa- tion of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each i nstruction is shown. do not use code marked C. the codes for the second word of a two-word instruction are described below.
65 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. instruction code table (continued) (for 4513 group) C C tj1a C tq1a tq2a tq3a C C C C C C C tw1a tw2a tw3a tw4a C tw6a C C tmra ti1a ti2a C C tk0a C C C C t1ab t2ab t3ab t4ab C C C C tsiab tadab C tr3ab C C C tr1ab C C taj1 C taq1 taq2 taq3 C C tala C taw1 taw2 taw3 taw4 C taw6 C tamr tai1 tai2 C tak0 tapu0 C C C C C C C C iap0 iap1 iap2 iap3 C C C C C C C C C C C C tab1 tab2 tab3 tab4 C C C C tabsi tabad C C C C C C snzt1 snzt2 snzt3 snzt4 C C C snzad snzsi C C C C C C C C C C C C C C C C C C C C C sst adst wrst C C C C C C C C C C C C C C C tam 0 tam 1 tam 2 tam 3 tam 4 tam 5 tam 6 tam 7 tam 8 tam 9 tam 10 tam 11 tam 12 tam 13 tam 14 tam 15 xam 0 xam 1 xam 2 xam 3 xam 4 xam 5 xam 6 xam 7 xam 8 xam 9 xam 10 xam 11 xam 12 xam 13 xam 14 xam 15 xami 0 xami 1 xami 2 xami 3 xami 4 xami 5 xami 6 xami 7 xami 8 xami 9 xami 10 xami 11 xami 12 xami 13 xami 14 xami 15 xamd 0 xamd 1 xamd 2 xamd 3 xamd 4 xamd 5 xamd 6 xamd 7 xamd 8 xamd 9 xamd 10 xamd 11 xamd 12 xamd 13 xamd 14 xamd 15 lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy tma 0 tma 1 tma 2 tma 3 tma 4 tma 5 tma 6 tma 7 tma 8 tma 9 tma 10 tma 11 tma 12 tma 13 tma 14 tma 15 bl bml bla bmla sea szd the second word 10 paaa aaaa 10 paaa aaaa 10 pp00 pppp 10 pp00 pppp 00 0111 nnnn 00 0010 1011 op0a op1a C op3a C C C C C C C C C tpu0a C C d 3 Cd 0 hex. notation 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 a b c d e f d 9 Cd 4 20 100001 21 100010 22 100011 23 100100 24 100101 25 100110 26 100111 27 101000 28 101001 29 101010 2a 101011 2b 101100 2c 101101 2d 101110 2e 101111 2f 110000 111111 30C3f 100000 the above table shows the relationship between machine language codes and machine language instructions. d 3 Cd 0 show the low- order 4 bits of the machine language code, and d 9 Cd 4 show the high-order 6 bits of the machine language code. the hexadecimal representation of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each instruction is shown. do not use code marked C. the codes for the second word of a two-word instruction are described below.
66 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. instruction code table (for 4514 group) nop C pof snzp di ei rc sc C C am amc tya C tba C bla cld C iny rd sd C dey and or teab C cma rar tab tay szb 0 szb 1 szb 2 szb 3 szd sean seam C C tda tabe C C C C szc bmla C C C C C C C snz0 snz1 snzi0 snzi1 C C tv2a tv1a C C C C rt rts rti C lz 0 lz 1 lz 2 lz 3 rb 0 rb 1 rb 2 rb 3 tasp tad tax taz tav1 tav2 C C C C C epof sb 0 sb 1 sb 2 sb 3 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 a 15 la 0 la 1 la 2 la 3 la 4 la 5 la 6 la 7 la 8 la 9 la 10 la 11 la 12 la 13 la 14 la 15 tabp 0 tabp 1 tabp 2 tabp 3 tabp 4 tabp 5 tabp 6 tabp 7 tabp 8 tabp 9 tabp 10 tabp 11 tabp 12 tabp 13 tabp 14 tabp 15 tabp 16 tabp 17 tabp 18 tabp 19 tabp 20 tabp 21 tabp 22 tabp 23 tabp 24 tabp 25 tabp 26 tabp 27 tabp 28 tabp 29 tabp 30 tabp 31 tabp 32 tabp 33 tabp 34 tabp 35 tabp 36 tabp 37 tabp 38 tabp 39 tabp 40 tabp 41 tabp 42 tabp 43 tabp 44 tabp 45 tabp 46 tabp 47 bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bml bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl bl tabp 48* tabp 49* tabp 50* tabp 51* tabp 52* tabp 53* tabp 54* tabp 55* tabp 56* tabp 57* tabp 58* tabp 59* tabp 60* tabp 61* tabp 62* tabp 63* d 3 Cd 0 hex. notation 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 a b c d e f d 9 Cd 4 00 000001 01 000010 02 000011 03 000100 04 000101 05 000110 06 000111 07 001000 08 001001 09 001010 0a 001011 0b 001100 0c 001101 0d 001110 0e 001111 0f bm bm bm bm bm bm bm bm bm bm bm bm bm bm bm bm 010000 010111 011000 011111 18C1f b b b b b b b b b b b b b b b b 10C17 000000 bl bml bla bmla sea szd the second word 10 paaa aaaa 10 paaa aaaa 10 pp00 pppp 10 pp00 pppp 00 0111 nnnn 00 0010 1011 ? * cannot be used in the m34514m6-xxxfp. the above table shows the relationship between machine language codes and machine language instructions. d 3 Cd 0 show the low-order 4 bits of the machine language code, and d 9 Cd 4 show the high-order 6 bits of the machine language code. the hexadecimal representa- tion of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each i nstruction is shown. do not use code marked C. the codes for the second word of a two-word instruction are described below.
67 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. instruction code table (continued) (for 4514 group) C C tj1a C tq1a tq2a tq3a C C C C C C C tw1a tw2a tw3a tw4a C tw6a C C tmra ti1a ti2a C C tk0a C C C C t1ab t2ab t3ab t4ab C C C C tsiab tadab C tr3ab C C C tr1ab C C taj1 C taq1 taq2 taq3 C C tala C taw1 taw2 taw3 taw4 C taw6 C tamr tai1 tai2 C tak0 tapu0 C C C C C C C C iap0 iap1 iap2 iap3 iap4 iap5 C C C C C C C C C C tab1 tab2 tab3 tab4 C C C C tabsi tabad C C C C C C snzt1 snzt2 snzt3 snzt4 C C C snzad snzsi C C C C C C C op0a op1a C op3a op4a op5a C C tfr0a C C C C tpu0a C C C C C C C C C C C C C C C C sst adst wrst C C C C C C C C C C C C C C C tam 0 tam 1 tam 2 tam 3 tam 4 tam 5 tam 6 tam 7 tam 8 tam 9 tam 10 tam 11 tam 12 tam 13 tam 14 tam 15 xam 0 xam 1 xam 2 xam 3 xam 4 xam 5 xam 6 xam 7 xam 8 xam 9 xam 10 xam 11 xam 12 xam 13 xam 14 xam 15 xami 0 xami 1 xami 2 xami 3 xami 4 xami 5 xami 6 xami 7 xami 8 xami 9 xami 10 xami 11 xami 12 xami 13 xami 14 xami 15 xamd 0 xamd 1 xamd 2 xamd 3 xamd 4 xamd 5 xamd 6 xamd 7 xamd 8 xamd 9 xamd 10 xamd 11 xamd 12 xamd 13 xamd 14 xamd 15 lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy lxy tma 0 tma 1 tma 2 tma 3 tma 4 tma 5 tma 6 tma 7 tma 8 tma 9 tma 10 tma 11 tma 12 tma 13 tma 14 tma 15 d 3 Cd 0 hex. notation 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 1 2 3 4 5 6 7 8 9 a b c d e f d 9 Cd 4 20 100001 21 100010 22 100011 23 100100 24 100101 25 100110 26 100111 27 101000 28 101001 29 101010 2a 101011 2b 101100 2c 101101 2d 101110 2e 101111 2f 110000 111111 30C3f 100000 bl bml bla bmla sea szd the second word 10 paaa aaaa 10 paaa aaaa 10 pp00 pppp 10 pp00 pppp 00 0111 nnnn 00 0010 1011 the above table shows the relationship between machine language codes and machine language instructions. d 3 Cd 0 show the low- order 4 bits of the machine language code, and d 9 Cd 4 show the high-order 6 bits of the machine language code. the hexadecimal representation of the code is also provided. there are one-word instructions and two-word instructions, but only the first word of each instruction is shown. do not use code marked C. the codes for the second word of a two-word instruction are described below.
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 68 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. (a) ? (b) (b) ? (a) (a) ? (y) (y) ? (a) (e 7 Ce 4 ) ? (b) (e 3 Ce 0 ) ? (a) (b) ? (e 7 Ce 4 ) (a) ? (e 3 Ce 0 ) (dr 2 Cdr 0 ) ? (a 2 Ca 0 ) (a 2 Ca 0 ) ? (dr 2 Cdr 0 ) (a 3 ) ? 0 (a 1 , a 0 ) ? (z 1 , z 0 ) (a 3 , a 2 ) ? 0 (a) ? (x) (a 2 Ca 0 ) ? (sp 2 Csp 0 ) (a 3 ) ? 0 (x) ? x, x = 0 to 15 (y) ? y, y = 0 to 15 (z) ? z, z = 0 to 3 (y) ? (y) + 1 (y) ? (y) C 1 (a) ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) C 1 (a) ? ? (m(dp)) (x) ? (x)exor(j) j = 0 to 15 (y) ? (y) + 1 (m(dp)) ? (a) (x) ? (x)exor(j) j = 0 to 15 tab tba tay tya teab tabe tda tad taz tax tasp lxy x, y lz z iny dey tam j xam j xamd j xami j tma j machine instructions 0000011110 0000001110 0000011111 0000001100 0000011010 0000101010 0000101001 0001010001 0001010011 0001010010 0001010000 11x 3 x 2 x 1 x 0 y 3 y 2 y 1 y 0 00010010z 1 z 0 0000010011 0000010111 101100 jjjj 101101 jjjj 101111 jjjj 101110 jjjj 101011 jjjj 01e 00e 01f 00c 01a 02a 029 051 053 052 050 3xy 048 +z 013 017 2cj 2dj 2fj 2ej 2bj 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ram addresses ram to register transfer register to register transfer
skip condition datailed description carry flag cy 69 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. transfers the contents of register b to register a. transfers the contents of register a to register b. transfers the contents of register y to register a. transfers the contents of register a to register y. transfers the contents of registers a and b to register e. transfers the contents of register e to registers a and b. transfers the contents of register a to register d. transfers the contents of register d to register a. transfers the contents of register z to register a. transfers the contents of register x to register a. transfers the contents of stack pointer (sp) to register a. loads the value x in the immediate field to register x, and the value y in the immediate field to register y. when the lxy instructions are continuously coded and executed, only the first lxy instruction is executed and other lxy instructions coded continuously are skipped. loads the value z in the immediate field to register z. adds 1 to the contents of register y. as a result of addition, when the contents of register y is 0, the next in- struction is skipped. subtracts 1 from the contents of register y. as a result of subtraction, when the contents of register y is 15, the next instruction is skipped. after transferring the contents of m(dp) to register a, an exclusive or operation is performed between reg- ister x and the value j in the immediate field, and stores the result in register x. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is per- formed between register x and the value j in the immediate field, and stores the result in register x. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is per- formed between register x and the value j in the immediate field, and stores the result in register x. subtracts 1 from the contents of register y. as a result of subtraction, when the contents of register y is 15, the next instruction is skipped. after exchanging the contents of m(dp) with the contents of register a, an exclusive or operation is per- formed between register x and the value j in the immediate field, and stores the result in register x. adds 1 to the contents of register y. as a result of addition, when the contents of register y is 0, the next instruction is skipped. after transferring the contents of register a to m(dp), an exclusive or operation is performed between reg- ister x and the value j in the immediate field, and stores the result in register x. C C C C C C C C C C C continuous description C (y) = 0 (y) = 15 C C (y) = 15 (y) = 0 C C C C C C C C C C C C C C C C C C C C C
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 70 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. note : p is 0 to 15 for m34513m2, p is 0 to 31 for m34513m4/e4, p is 0 to 47 for m34513m6 and m34514m6, and p is 0 to 63 for m34513m8/e8 and m34514m8/e8. machine instructions (continued) 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 07n 08p +p 00a 00b 06n 018 019 007 006 02f 01c 01d 05c +j 04c +j 02j 026 025 07n 000111nnnn 0010p 5 p 4 p 3 p 2 p 1 p 0 0000001010 0000001011 000110nnnn 0000011000 0000011001 0000000111 0000000110 0000101111 0000011100 0000011101 00010111j j 00010011j j 00001000j j 0000100110 0000100101 000111nnnn la n tabp p am amc a n and or sc rc szc cma rar sb j rb j szb j seam sea n 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 arithmetic operation comparison operation bit operation (a) ? n n = 0 to 15 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (b) ? (rom(pc)) 7 C 4 (a) ? (rom(pc)) 3 C 0 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (note) (a) ? (a) + (m(dp)) (a) ? (a) + (m(dp)) +(cy) (cy) ? carry (a) ? (a) + n n = 0 to 15 (a) ? (a) and (m(dp)) (a) ? (a) or (m(dp)) (cy) ? 1 (cy) ? 0 (cy) = 0 ? (a) ? (a) ? cy ? a 3 a 2 a 1 a 0 (mj(dp)) ? 1 j = 0 to 3 (mj(dp)) ? 0 j = 0 to 3 (mj(dp)) = 0 ? j = 0 to 3 (a) = (m(dp)) ? (a) = n ? n = 0 to 15
skip condition datailed description carry flag cy 71 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. continuous description C C C overflow = 0 C C C C (cy) = 0 C C C C (mj(dp)) = 0 j = 0 to 3 (a) = (m(dp)) (a) = n C C C 0/1 C C C 1 0 C C 0/1 C C C C C loads the value n in the immediate field to register a. when the la instructions are continuously coded and executed, only the first la instruction is executed and other la instructions coded continuously are skipped. transfers bits 7 to 4 to register b and bits 3 to 0 to register a. these bits 7 to 0 are the rom pattern in ad- dress (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) 2 specified by registers a and d in page p. when this instruction is executed, 1 stage of stack register is used. adds the contents of m(dp) to register a. stores the result in register a. the contents of carry flag cy re- mains unchanged. adds the contents of m(dp) and carry flag cy to register a. stores the result in register a and carry flag cy. adds the value n in the immediate field to register a. the contents of carry flag cy remains unchanged. skips the next instruction when there is no overflow as the result of operation. takes the and operation between the contents of register a and the contents of m(dp), and stores the re- sult in register a. takes the or operation between the contents of register a and the contents of m(dp), and stores the result in register a. sets (1) to carry flag cy. clears (0) to carry flag cy. skips the next instruction when the contents of carry flag cy is 0. stores the ones complement for register as contents in register a. rotates 1 bit of the contents of register a including the contents of carry flag cy to the right. sets (1) the contents of bit j (bit specified by the value j in the immediate field) of m(dp). clears (0) the contents of bit j (bit specified by the value j in the immediate field) of m(dp). skips the next instruction when the contents of bit j (bit specified by the value j in the immediate field) of m(dp) is 0. skips the next instruction when the contents of register a is equal to the contents of m(dp). skips the next instruction when the contents of register a is equal to the value n in the immediate field.
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 72 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. b a bl p, a bla p bm a bml p, a bmla p rti rt rts di ei snz0 snz1 011a 6 a 5 a 4 a 3 a 2 a 1 a 0 00111p 4 p 3 p 2 p 1 p 0 10p 5 a 6 a 5 a 4 a 3 a 2 a 1 a 0 0000010000 10p 5 p 4 00p 3 p 2 p 1 p 0 010a 6 a 5 a 4 a 3 a 2 a 1 a 0 00110p 4 p 3 p 2 p 1 p 0 10p 5 a 6 a 5 a 4 a 3 a 2 a 1 a 0 0000110000 10p 5 p 4 00p 3 p 2 p 1 p 0 0001000110 0001000100 0001000101 0000000100 0000000101 0000111000 0000111001 18a +a 0ep +p 2pa +a 010 2pp 1aa 0cp +p 2pa +a 030 2pp 046 044 045 004 005 038 039 1 2 2 1 2 2 1 1 1 1 1 1 1 1 2 2 1 2 2 1 2 2 1 1 1 1 subroutine operation return operation interrupt operation machine instructions (continued) (pc l ) ? a 6 Ca 0 (pc h ) ? p (pc l ) ? a 6 Ca 0 (note) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 , a 3 Ca 0 ) (note) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? 2 (pc l ) ? a 6 Ca 0 (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? a 6 Ca 0 (note) (sp) ? (sp) + 1 (sk(sp)) ? (pc) (pc h ) ? p (pc l ) ? (dr 2 Cdr 0 ,a 3 Ca 0 ) (note) (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (pc) ? (sk(sp)) (sp) ? (sp) C 1 (inte) ? 0 (inte) ? 1 (exf0) = 1 ? after skipping (exf0) ? 0 (exf1) = 1 ? after skipping (exf1) ? 0 branch operation note : p is 0 to 15 for m34513m2, p is 0 to 31 for m34513m4/e4, p is 0 to 47 for m34513m6 and m34514m6, and p is 0 to 63 for m34513m8/e8 and m34514m8/e8.
skip condition datailed description carry flag cy 73 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. C C C C C C C C skip at uncondition C C (exf0) = 1 (exf1) = 1 branch within a page : branches to address a in the identical page. branch out of a page : branches to address a in page p. branch out of a page : branches to address (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) 2 specified by registers d and a in page p. call the subroutine in page 2 : calls the subroutine at address a in page 2. call the subroutine : calls the subroutine at address a in page p. call the subroutine : calls the subroutine at address (dr 2 dr 1 dr 0 a 3 a 2 a 1 a 0 ) 2 specified by registers d and a in page p. returns from interrupt service routine to main routine. returns each value of data pointer (x, y, z), carry flag, skip status, nop mode status by the continuous de- scription of the la/lxy instruction, register a and register b to the states just before interrupt. returns from subroutine to the routine called the subroutine. returns from subroutine to the routine called the subroutine, and skips the next instruction at uncondition. clears (0) to the interrupt enable flag inte, and disables the interrupt. sets (1) to the interrupt enable flag inte, and enables the interrupt. skips the next instruction when the contents of exf0 flag is 1. after skipping, clears (0) to the exf0 flag. skips the next instruction when the contents of exf1 flag is 1. after skipping, clears (0) to the exf1 flag. C C C C C C C C C C C C C
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 74 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. machine instructions (continued) snzi0 snzi1 tav1 tv1a tav2 tv2a tai1 ti1a tai2 ti2a taw1 tw1a taw2 tw2a taw3 tw3a taw4 tw4a taw6 tw6a i1 2 = 1 : (int0) = h ? i1 2 = 0 : (int0) = l ? i2 2 = 1 : (int1) = h ? i2 2 = 0 : (int1) = l ? (a) ? (v1) (v1) ? (a) (a) ? (v2) (v2) ? (a) (a) ? (i1) (i1) ? (a) (a) ? (i2) (i2) ? (a) (a) ? (w1) (w1) ? (a) (a) ? (w2) (w2) ? (a) (a) ? (w3) (w3) ? (a) (a) ? (w4) (w4) ? (a) (a) ? (w6) (w6) ? (a) 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 03a 03b 054 03f 055 03e 253 217 254 218 24b 20e 24c 20f 24d 210 24e 211 250 213 0000111010 0000111011 0001010100 0000111111 0001010101 0000111110 1001010011 1000010111 1001010100 1000011000 1001001011 1000001110 1001001100 1000001111 1001001101 1000010000 1001001110 1000010001 1001010000 1000010011 interrupt operation timer operation
skip condition datailed description carry flag cy 75 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. when bit 2 (i1 2 ) of register i1 is 1 : skips the next instruction when the level of int0 pin is h. when bit 2 (i1 2 ) of register i1 is 0 : skips the next instruction when the level of int0 pin is l. when bit 2 (i2 2 ) of register i2 is 1 : skips the next instruction when the level of int1 pin is h. when bit 2 (i2 2 ) of register i2 is 0 : skips the next instruction when the level of int1 pin is l. transfers the contents of interrupt control register v1 to register a. transfers the contents of register a to interrupt control register v1. transfers the contents of interrupt control register v2 to register a. transfers the contents of register a to interrupt control register v2. transfers the contents of interrupt control register i1 to register a. transfers the contents of register a to interrupt control register i1. transfers the contents of interrupt control register i2 to register a. transfers the contents of register a to interrupt control register i2. transfers the contents of timer control register w1 to register a. transfers the contents of register a to timer control register w1. transfers the contents of timer control register w2 to register a. transfers the contents of register a to timer control register w2. transfers the contents of timer control register w3 to register a. transfers the contents of register a to timer control register w3. transfers the contents of timer control register w4 to register a. transfers the contents of register a to timer control register w4. transfers the contents of timer control register w6 to register a. transfers the contents of register a to timer control register w6. C C C C C C C C C C C C C C C C C C C C C C (int0) = h however, i1 2 = 1 (int0) = l however, i1 2 = 0 (int1) = h however, i2 2 = 1 (int1) = l however, i2 2 = 0 C C C C C C C C C C C C C C C C C C
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 76 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. machine instructions (continued) tab1 t1ab tab2 t2ab tab3 t3ab tab4 t4ab tr1ab tr3ab snzt1 snzt2 snzt3 snzt4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 270 230 271 231 272 232 273 233 23f 23b 280 281 282 283 1001110000 1000110000 1001110001 1000110001 1001110010 1000110010 1001110011 1000110011 1000111111 1000111011 1010000000 1010000001 1010000010 1010000011 (b) ? (t1 7 Ct1 4 ) (a) ? (t1 3 Ct1 0 ) (r1 7 Cr1 4 ) ? (b) (t1 7 Ct1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (t1 3 Ct1 0 ) ? (a) (b) ? (t2 7 Ct2 4 ) (a) ? (t2 3 Ct2 0 ) (r2 7 Cr2 4 ) ? (b) (t2 7 Ct2 4 ) ? (b) (r2 3 Cr2 0 ) ? (a) (t2 3 Ct2 0 ) ? (a) (b) ? (t3 7 Ct3 4 ) (a) ? (t3 3 Ct3 0 ) (r3 7 Cr3 4 ) ? (b) (t3 7 Ct3 4 ) ? (b) (r3 3 Cr3 0 ) ? (a) (t3 3 Ct3 0 ) ? (a) (b) ? (t4 7 Ct4 4 ) (a) ? (t4 3 Ct4 0 ) (r4 7 Cr4 4 ) ? (b) (t4 7 Ct4 4 ) ? (b) (r4 3 Cr4 0 ) ? (a) (t4 3 Ct4 0 ) ? (a) (r1 7 Cr1 4 ) ? (b) (r1 3 Cr1 0 ) ? (a) (r3 7 Cr3 4 ) ? (b) (r3 3 Cr3 0 ) ? (a) (t1f) = 1 ? after skipping (t1f) ? 0 (t2f) = 1 ? after skipping (t2f) ? 0 (t3f) = 1 ? after skipping (t3f) ? 0 (t4f) = 1 ? after skipping (t4f) ? 0 timer operation
skip condition datailed description carry flag cy 77 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. C C C C C C C C C C C C C C C C C C C C C C C C (t1f) = 1 (t2f) =1 (t3f) = 1 (t4f) = 1 transfers the contents of timer 1 to registers a and b. transfers the contents of registers a and b to timer 1 and timer 1 reload register. transfers the contents of timer 2 to registers a and b. transfers the contents of registers a and b to timer 2 and timer 2 reload register. transfers the contents of timer 3 to registers a and b. transfers the contents of registers a and b to timer 3 and timer 3 reload register. transfers the contents of timer 4 to registers a and b. transfers the contents of registers a and b to timer 4 and timer 4 reload register. transfers the contents of registers a and b to timer 1 reload register. transfers the contents of registers a and b to timer 3 reload register. skips the next instruction when the contents of t1f flag is 1. after skipping, clears (0) to t1f flag. skips the next instruction when the contents of t2f flag is 1. after skipping, clears (0) to t2f flag. skips the next instruction when the contents of t3f flag is 1. after skipping, clears (0) to t3f flag. skips the next instruction when the contents of t4f flag is 1. after skipping, clears (0) to t4f flag.
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 78 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. machine instructions (continued) iap0 op0a iap1 op1a iap2 iap3 op3a iap4* op4a* iap5* op5a* cld rd sd szd tk0a tak0 tpu0a tapu0 tfr0a* 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 260 220 261 221 262 263 223 264 224 265 225 011 014 015 024 02b 21b 256 22d 257 228 1001100000 1000100000 1001100001 1000100001 1001100010 1001100011 1000100011 1001100100 1000100100 1001100101 1000100101 0000010001 0000010100 0000010101 0000100100 0000101011 1000011011 1001010110 1000101101 1001010111 1000101000 input/output operation (a) ? (p0) (p0) ? (a) (a) ? (p1) (p1) ? (a) (a 2 Ca 0 ) ? (p2 2 Cp2 0 ) (a 3 ) ? 0 (a) ? (p3) (p3) ? (a) (a) ? (p4) (p4) ? (a) (a) ? (p5) (p5) ? (a) (d) ? 1 (d(y)) ? 0 (y) = 0 to 7 (d(y)) ? 1 (y) = 0 to 7 (d(y)) = 0 ? (y) = 0 to 7 (k0) ? (a) (a) ? (k0) (pu0) ? (a) (a) ? (pu0) (fr0) ? (a) *: the 4513 group does not have these instructions.
skip condition datailed description carry flag cy 79 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C (d(y)) = 0 (y) = 0 to 7 C C C C C transfers the input of port p0 to register a. outputs the contents of register a to port p0. transfers the input of port p1 to register a. outputs the contents of register a to port p1. transfers the input of port p2 to register a. transfers the input of port p3 to register a. outputs the contents of register a to port p3. transfers the input of port p4 to register a. outputs the contents of register a to port p4. transfers the input of port p5 to register a. outputs the contents of register a to port p5. sets (1) to port d. clears (0) to a bit of port d specified by register y. sets (1) to a bit of port d specified by register y. skips the next instruction when a bit of port d specified by register y is 0. transfers the contents of register a to key-on wakeup control register k0. transfers the contents of key-on wakeup control register k0 to register a. transfers the contents of register a to pull-up control register pu0. transfers the contents of pull-up control register pu0 to register a. transfers the contents of register a to direction register fr0.
parameter instruction code function number of cycles number of words mnemonic type of instructions d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 hexadecimal notation 80 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. machine instructions (continued) tabsi tsiab taj1 tj1a sst snzsi tabad tala tadab taq1 tq1a adst snzad taq2 tq2a nop pof epof snzp wrst tamr tmra taq3 tq3a 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 278 238 242 202 29e 288 279 249 239 244 204 29f 287 245 205 000 002 05b 003 2a0 252 216 246 206 1001111000 1000111000 1001000010 1000000010 1010011110 1010001000 1001111001 1001001001 1000111001 1001000100 1000000100 1010011111 1010000111 1001000101 1000000101 0000000000 0000000010 0001011011 0000000011 1010100000 1001010010 1000010110 1001000110 1000000110 a-d conversion operation other operation (a) ? (si 3 Csi 0 ) (b) ? (si 7 Csi 4 ) (si 3 Csi 0 ) ? (a) (si 7 Csi 4 ) ? (b) (a) ? (j1) (j1) ? (a) (siof) ? 0 serial i/o starting (siof) = 1 ? after skipping (siof) ? 0 (a) ? (ad 5 Cad 2 ) (b) ? (ad 9 Cad 6 ) however, in the comparator mode, (a) ? (ad 3 Cad 0 ) (b) ? (ad 7 Cad 4 ) (a) ? (ad 1 , ad 0 , 0, 0) (ad 3 Cad 0 ) ? (a) (ad 7 Cad 4 ) ? (b) (a) ? (q1) (q1) ? (a) (adf) ? 0 a-d conversion starting (adf) = 1 ? after skipping (adf) ? 0 (a) ? (q2) (q2) ? (a) (pc) ? (pc) + 1 ram back-up pof instruction valid (p) = 1 ? (wdf1) ? 0 (wef) ? 1 (a) ? (mr) (mr) ? (a) (a) ? (q3) (q3 3 , q3 2 ) ? (a 3 , a 2 ) (q3 1 ) ? (cmp1 comparison result) (q3 0 ) ? (cmp0 comparison result) serial i/o control operation
skip condition datailed description carry flag cy 81 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. C C C C C (siof) = 1 C C C C C C (adf) = 1 C C C C C (p) = 1 C C C C C C C C C C C C C C C C C C C C C C C C C C C C C transfers the contents of serial i/o register si to registers a and b. transfers the contents of registers a and b to serial i/o register si. transfers the contents of serial i/o mode register j1 to register a. transfers the contents of register a to serial i/o mode register j1. clears (0) to siof flag and starts serial i/o. skips the next instruction when the contents of siof flag is 1. after skipping, clears (0) to siof flag. transfers the high-order 8 bits of the contents of register ad to registers a and b. transfers the low-order 2 bits of the contents of register ad to the high-order 2 bits of the contents of regis- ter a. simultaneously, the low-order 2 bits of the contents of the register a is 0. transfers the contents of registers a and b to the comparator register at the comparator mode. transfers the contents of the a-d control register q1 to register a. transfers the contents of register a to the a-d control register q1. clears the adf flag, and the a-d conversion at the a-d conversion mode or the comparator operation at the comparator mode is started. skips the next instruction when the contents of adf flag is 1. after skipping, clears (0) the contents of adf flag. transfers the contents of the a-d control register q2 to register a. transfers the contents of register a to the a-d control register q2. no operation puts the system in ram back-up state by executing the pof instruction after executing the epof instruction. makes the immediate pof instruction valid by executing the epof instruction. skips the next instruction when p flag is 1. after skipping, p flag remains unchanged. operates the watchdog timer and initializes the watchdog timer flag wdf1. transfers the contents of the clock control register mr to register a. transfers the contents of register a to the clock control register mr. transfers the contents of the voltage comparator control register q3 to register a. transfers the contents of the high-order 2 bits of register a to the high-order 2 bits of voltage comparator control register q3, and the comparison result of the voltage comparator is transferred to the low-order 2 bits of the register q3.
82 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. v1 3 v1 2 v1 1 v1 0 v2 3 v2 2 v2 1 v2 0 serial i/o interrupt enable bit a-d interrupt enable bit timer 4 interrupt enable bit timer 3 interrupt enable bit interrupt control register v1 timer 2 interrupt enable bit timer 1 interrupt enable bit external 1 interrupt enable bit external 0 interrupt enable bit interrupt disabled (snzt2 instruction is valid) interrupt enabled (snzt2 instruction is invalid) interrupt disabled (snzt1 instruction is valid) interrupt enabled (snzt1 instruction is invalid) interrupt disabled (snz1 instruction is valid) interrupt enabled (snz1 instruction is invalid) interrupt disabled (snz0 instruction is valid) interrupt enabled (snz0 instruction is invalid) interrupt disabled (snzsi instruction is valid) interrupt enabled (snzsi instruction is invalid) interrupt disabled (snzad instruction is valid) interrupt enabled (snzad instruction is invalid) interrupt disabled (snzt4 instruction is valid) interrupt enabled (snzt4 instruction is invalid) interrupt disabled (snzt3 instruction is valid) interrupt enabled (snzt3 instruction is invalid) 0 1 0 1 0 1 0 1 r/w at ram back-up : 0000 2 at reset : 0000 2 r/w at ram back-up : 0000 2 at reset : 0000 2 interrupt control register v2 r/w at ram back-up : 0000 2 at reset : 0000 2 0 1 0 1 0 1 0 1 control registers i1 3 i1 2 i1 1 i1 0 i2 3 i2 2 i2 1 i2 0 not used interrupt valid waveform for int0 pin/ return level selection bit (note 2) int0 pin edge detection circuit control bit int0 pin timer 1 control enable bit this bit has no function, but read/write is enabled. falling waveform (l level of int1 pin is recognized with the snzi1 instruction)/l level rising waveform (h level of int1 pin is recognized with the snzi1 instruction)/h level one-sided edge detected both edges detected disabled enabled not used interrupt valid waveform for int1 pin/ return level selection bit (note 3) int1 pin edge detection circuit control bit int1 pin timer 3 control enable bit notes 1: r represents read enabled, and w represents write enabled. 2: when the contents of i1 2 is changed, the external interrupt request flag exf0 may be set. accordingly, clear exf0 flag with the snz0 instruction. 3: when the contents of i2 2 is changed, the external interrupt request flag exf1 may be set. accordingly, clear exf1 flag with the snz1 instruction. interrupt control register i1 r/w at ram back-up : state retained at reset : 0000 2 this bit has no function, but read/write is enabled. falling waveform (l level of int0 pin is recognized with the snzi0 instruction)/l level rising waveform (h level of int0 pin is recognized with the snzi0 instruction)/h level one-sided edge detected both edges detected disabled enabled 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 interrupt control register i2 r/w at ram back-up : state retained at reset : 0000 2
83 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 0 1 0 1 0 1 0 1 w2 1 0 0 1 1 stop (state initialized) operating instruction clock divided by 4 instruction clock divided by 16 stop (state retained) operating count start synchronous circuit not selected count start synchronous circuit selected prescaler control bit prescaler dividing ratio selection bit timer 1 control bit timer 1 count start synchronous circuit control bit stop (state retained) operating this bit has no function, but read/write is enabled. count source timer 1 underflow signal prescaler output cntr0 input 16 bit timer (wdt) underflow signal timer 2 control bit not used timer 2 count source selection bits 0 1 0 1 w2 0 0 1 0 1 w1 3 w1 2 w1 1 w1 0 w2 3 w2 2 w2 1 w2 0 w3 3 w3 2 w3 1 w3 0 w4 3 w4 2 w4 1 w4 0 w6 3 w6 2 w6 1 w6 0 timer control register w1 r/w at ram back-up : 0000 2 at reset : 0000 2 r/w at ram back-up : 0000 2 at reset : 0000 2 timer control register w2 r/w at ram back-up : state retained at reset : 0000 2 w3 1 0 0 1 1 stop (state retained) operating count start synchronous circuit not selected count start synchronous circuit selected count source timer 2 underflow signal prescaler output not available not available timer 3 control bit timer 3 count start synchronous circuit control bit timer 3 count source selection bits 0 1 0 1 w3 0 0 1 0 1 timer control register w3 r/w at ram back-up : state retained at reset : 0000 2 w4 1 0 0 1 1 stop (state retained) operating this bit has no function, but read/write is enabled. count source timer 3 underflow signal prescaler output cntr1 input not available timer 4 control bit not used timer 4 count source selection bits 0 1 0 1 w4 0 0 1 0 1 timer control register w4 r/w at ram back-up : state retained at reset : 0000 2 timer 3 underflow signal output divided by 2 cntr1 output control by timer 4 underflow signal divided by 2 d 7 (i/o)/cntr1 input cntr1 (i/o)/d 7 (input) timer 1 underflow signal output divided by 2 cntr0 output control by timer 2 underflow signal divided by 2 d 6 (i/o)/cntr0 input cntr0 (i/o)/d 6 (input) cntr1 output control bit d 7 /cntr1 function selection bit cntr0 output control bit d 6 /cntr0 output control bit 0 1 0 1 0 1 0 1 timer control register w6 r/w at ram back-up : state retained at reset : 0000 2 note: r represents read enabled, and w represents write enabled.
84 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. selected pins a in0 a in1 a in2 a in3 a in4 (not available for the 4513 group) a in5 (not available for the 4513 group) a in6 (not available for the 4513 group) a in7 (not available for the 4513 group) this bit has no function, but read/write is enabled. instruction clock signal divided by 8 instruction clock signal divided by 4 input ports p2 0 , p2 1 , p2 2 selected serial i/o ports s ck , s out , s in /input ports p2 0 , p2 1 , p2 2 selected external clock internal clock (instruction clock divided by 4 or 8) j1 3 j1 2 j1 1 j1 0 serial i/o mode register j1 not used serial i/o internal clock dividing ratio selection bit serial i/o port selection bit serial i/o synchronous clock selection bit at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w q1 3 q1 2 q1 1 q1 0 a-d control register q1 note used analog input pin selection bits (note 2) at reset : 0000 2 at ram back-up : state retained 0 1 q1 2 0 0 0 0 1 1 1 1 q1 1 0 0 1 1 0 0 1 1 this bit has no function, but read/write is enabled. at reset : 0000 2 q2 3 q2 2 q2 1 q2 0 a-d control register q2 a-d conversion mode comparator mode p4 3 , p4 2 (read/write enabled for the 4513 group) a in7 , a in6 /p4 3 , p4 2 (read/write enabled for the 4513 group) p4 1 (read/write enabled for the 4513 group) a in5 /p4 1 (read/write enabled for the 4513 group) p4 0 (read/write enabled for the 4513 group) a in4 /p4 0 (read/write enabled for the 4513 group) a-d operation mode selection bit p4 3 /a in7 and p4 2 /a in6 pin function selec- tion bit (not used for the 4513 group) p4 1 /a in5 pin function selection bit (not used for the 4513 group) p4 0 /a in4 pin function selection bit (not used for the 4513 group) at ram back-up : state retained 0 1 0 1 0 1 0 1 notes 1: r represents read enabled, w represents write enabled. 2: select a in4 Ca in7 with register q1 after setting register q2. 3: bits 0 and 1 of register q3 can be only read. q1 0 0 1 0 1 0 1 0 1 r/w r/w mr 3 mr 2 mr 1 mr 0 clock control register mr f(x in ) (high-speed mode) f(x in )/2 (middle-speed mode) this bit has no function, but read/write is enabled. this bit has no function, but read/write is enabled. this bit has no function, but read/write is enabled. system clock selection bit not used not used not used at reset : 1000 2 at ram back-up : 1000 2 0 1 0 1 0 1 0 1 r/w q3 3 q3 2 q3 1 q3 0 comparator control register q3 (note 3) at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w voltage comparator (cmp1) invalid voltage comparator (cmp1) valid voltage comparator (cmp0) invalid voltage comparator (cmp0) valid cmp1- > cmp1+ cmp1- < cmp1+ cmp0- > cmp0+ cmp0- < cmp0+ voltage comparator (cmp1) control bit voltage comparator (cmp0) control bit cmp1 comparison result store bit cmp0 comparison reslut store bit
85 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. k0 3 k0 2 k0 1 k0 0 key-on wakeup control register k0 pu0 3 pu0 2 pu0 1 pu0 0 key-on wakeup not used key-on wakeup used key-on wakeup not used key-on wakeup used key-on wakeup not used key-on wakeup used key-on wakeup not used key-on wakeup used pins p1 2 and p1 3 key-on wakeup control bit pins p1 0 and p1 1 key-on wakeup control bit pins p0 2 and p0 3 key-on wakeup control bit pins p0 0 and p0 1 key-on wakeup control bit at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on pull-up transistor off pull-up transistor on pins p1 2 and p1 3 pull-up transistor control bit pins p1 0 and p1 1 pull-up transistor control bit pins p0 2 and p0 3 pull-up transistor control bit pins p0 0 and p0 1 pull-up transistor control bit r/w pull-up control register pu0 at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 r/w notes 1: r represents read enabled, and w represents write enabled. 2: the 4513 group does not have the direction register fr0. fr0 3 fr0 2 fr0 1 fr0 0 port p5 3 input port p5 3 output port p5 2 input port p5 2 output port p5 1 input port p5 1 output port p5 0 input port p5 0 output port p5 3 input/output control bit port p5 2 input/output control bit port p5 1 input/output control bit port p5 0 input/output control bit direction register fr0 (note 2) at reset : 0000 2 at ram back-up : state retained 0 1 0 1 0 1 0 1 w
86 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. absolute maximum ratings parameter supply voltage input voltage p0, p1, p2, p3, p4, p5, reset , x in , vdce input voltage d 0 Cd 7 input voltage a in0 Ca in7 output voltage p0, p1, p3, p4, p5, reset output voltage d 0 Cd 7 output voltage x out power dissipation operating temperature range storage temperature range conditions output transistors in cut-off state ta = 25 c symbol v dd v i v i v i v o v o v o p d topr ts t g package: 42p2r package: 32p6b package: 32p4b unit v v v v v v v mw c c ratings C0.3 to 7.0 C0.3 to v dd +0.3 C0.3 to 13 C0.3 to v dd +0.3 C0.3 to v dd +0.3 C0.3 to 13 C0.3 to v dd +0.3 300 300 1100 C20 to 85 C40 to 125
87 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. recommended operating conditions 1 (mask rom version:ta = C20 c to 85 c, v dd = 2.0 v to 5.5 v, unless otherwise noted) (one time prom version:ta = C20 c to 85 c, v dd = 2.5 v to 5.5 v, unless otherwise noted) symbol v dd v ram v ss v ih v ih v ih v ih v il v il v il i oh (peak) i oh (avg) i ol (peak) i ol (peak) i ol (peak) i ol (peak) i ol (avg) i ol (avg) i ol (avg) i ol (avg) s i oh (avg) s i ol (avg) parameter supply voltage ram back-up voltage (at ram back-up mode) supply voltage h level input voltage h level input voltage h level input voltage h level input voltage l level input voltage l level input voltage l level input voltage h level peak output current h level average output current l level peak output current l level peak output current l level peak output current l level peak output current l level average output current l level average output current l level average output current l level average output current h level total average current l level total average current note: the average output current (i oh , i ol ) is the average value during 100 ms. unit v v v v v v v v v v ma ma ma ma ma ma ma ma ma ma ma conditions mask rom version middle-speed mode mask rom version high-speed mode one time prom version middle-speed mode one time prom version high-speed mode mask rom version one time prom version p0, p1, p2, p3, p4, p5, x in , vdce d 0 Cd 7 reset cntr0, cntr1, s in , s ck , int0, int1 p0, p1, p2, p3, p4, p5, d 0 Cd 7 , x in , vdce reset cntr0, cntr1, s in , s ck , int0, int1 p5 p5 (note) p3, reset d 6 , d 7 d 0 Cd 5 p0, p1, p4, p5, s ck , s out p3, reset (note) d 6 , d 7 (note) d 0 Cd 5 (note) p0, p1, p4, p5, s ck , s out (note) p5 p5, d, reset , s ck , s out p0, p1, p3, p4 max. 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 v dd 12 v dd v dd 0.2v dd 0.3v dd 0.15v dd 10 4 40 30 24 12 24 12 5 2 30 15 15 7 12 6 80 80 limits min. 2.5 2.0 4.0 2.5 2.0 2.5 4.0 2.5 1.8 2.0 0.8v dd 0.8v dd 0.85v dd 0.85v dd 0 0 0 C20 C10 C10 C5 C30 typ. 0 f(x in ) 4.2 mhz f(x in ) 3.0 mhz f(x in ) 4.2 mhz f(x in ) 2.0 mhz f(x in ) 1.5 mhz f(x in ) 4.2 mhz f(x in ) 4.2 mhz f(x in ) 2.0 mhz v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v v dd = 5.0 v v dd = 3.0 v
88 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v v dd = 2.0 v to 5.5 v v dd = 4.0 v to 5.5 v v dd = 2.5 v to 5.5 v recommended operating conditions 2 (mask rom version:ta = C20 c to 85 c, v dd = 2.0 v to 5.5 v, unless otherwise noted) (one time prom version:ta = C20 c to 85 c, v dd = 2.5 v to 5.5 v, unless otherwise noted) symbol f(x in ) f(x in ) tw(s ck ) tw(cntr) parameter oscillation frequency (with a ceramic resonator) oscillation frequency (with external clock input) serial i/o external clock period (h and l pulse width) timer external input period (h and l pulse width) conditions unit mhz mhz m s ns m s ns m s m s ns m s ns m s max. 4.2 3.0 4.2 4.2 2.0 1.5 4.2 2.0 3.0 3.0 3.0 1.0 0.8 3.0 1.0 limits mask rom version middle-speed mode one time prom version middle-speed mode mask rom version high-speed mode one time prom version high-speed mode mask rom version middle-speed mode one time prom version middle-speed mode mask rom version high-speed mode one time prom version high-speed mode mask rom version middle-speed mode one time prom version middle-speed mode mask rom version high-speed mode one time prom version high-speed mode mask rom version middle-speed mode one time prom version middle-speed mode mask rom version high-speed mode one time prom version high-speed mode min. typ. 1.5 3.0 4.0 1.5 3.0 750 1.5 2.0 750 1.5 1.5 3.0 4.0 1.5 3.0 750 1.5 2.0 750 1.5
89 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. electrical characteristics (mask rom version:ta = C20 c to 85 c, v dd = 2.0 v to 5.5 v, unless otherwise noted) (one time prom version:ta = C20 c to 85 c, v dd = 2.5 v to 5.5 v, unless otherwise noted) symbol v oh v ol v ol v ol v ol i ih i ih i il i il i dd r pu v t+ C v tC v t+ C v tC parameter h level output voltage p5 l level output voltage p0, p1, p4, p5 l level output voltage p3, reset l level output voltage d 6 , d 7 l level output voltage d 0 Cd 5 h level input current p0, p1, p2, p3, p4, p5, reset , vdce h level input current d 0 Cd 7 l level input current p0, p1, p2, p3, p4, p5, reset , vdce l level input current d 0 Cd 7 supply current pull-up resistor value hysteresis int0, int1, cntr0, cntr1, s in , s ck hysteresis reset at active mode at ram back-up mode unit v v v v v v m a m a m a m a ma m a k w v v test conditions v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v i = v dd , port p4 selected, port p5: input state v i = 12 v v i = 0 v no pull-up of ports p0 and p1, port p4 selected, port p5: input state v i = 0 v v dd = 5 v middle-speed mode v dd = 3 v middle-speed mode v dd = 5 v high-speed mode v dd = 3 v high-speed mode ta = 25 c v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v v dd = 5 v v dd = 3 v limits max. 2 0.9 2 0.9 2 0.9 2 0.9 2 0.9 1 1 5.5 1.5 2.7 0.6 9.0 1.8 2.7 0.9 1 10 6 125 250 i oh = C10 ma i oh = C5 ma i ol = 12 ma i ol = 6 ma i ol = 5 ma i ol = 2 ma i ol = 30 ma i ol = 10 ma i ol = 15 ma i ol = 5 ma i ol = 15 ma i ol = 3 ma min. 3 2 C1 C1 20 40 typ. 1.8 0.5 0.9 0.2 3.0 0.6 0.9 0.3 0.1 50 100 0.3 0.3 1.5 0.6 f(x in ) = 4.0 mhz f(x in ) = 400 khz f(x in ) = 4.0 mhz f(x in ) = 400 khz f(x in ) = 4.0 mhz f(x in ) = 400 khz f(x in ) = 2.0 mhz f(x in ) = 400 khz v i = 0 v
90 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. a-d converter recommended operating conditions (comparator mode included, ta = C20 c to 85 c, unless otherwise noted) symbol v dd v ia f(x in ) parameter supply voltage analog input voltage oscillation frequency a-d converter characteristics (ta = C20 c to 85 c, unless otherwise noted) conditions unit v v mhz mhz middle-speed mode, v dd 3 2.7 v high-speed mode, v dd 3 2.7 v min. 2.7 0 0.8 0.4 typ. max. 5.5 v dd limits symbol C C C v 0t v fst ia dd t conv C C C parameter resolution linearity error differential non-linearity error zero transition voltage full-scale transition voltage aCd operating current a-d conversion time comparator resolution comparator error (note) comparator comparison time test conditions unit bits lsb lsb mv mv ma m s bits mv m s ta = 25 c, v dd = 2.7 v to 5.5 v ta = C25 c to 85 c, v dd = 3.0 v to 5.5 v ta = 25 c, v dd = 2.7 v to 5.5 v ta = C25 c to 85 c, v dd = 3.0 v to 5.5 v v dd = 5.12 v v dd = 3.072 v v dd = 5.12 v v dd = 3.072 v v dd = 5.0 v v dd = 3.0 v f(x in ) = 4.0 mhz, middle-speed mode f(x in ) = 4.0 mhz, high-speed mode comparator mode v dd = 5.12 v v dd = 3.072 v f(x in ) = 4.0 mhz, middle-speed mode f(x in ) = 4.0 mhz, high-speed mode min. 0 0 5105 3060 typ. 5 3 5115 3069 0.7 0.2 max. 10 2 0.9 20 15 5125 3075 2.0 0.4 93.0 46.5 8 20 15 12 6 limits f(x in ) = 0.4 mhz to 4.0 mhz f(x in ) = 0.4 mhz to 2.0 mhz note: as for the error from the ideal value in the comparator mode, when the contents of the comparator register is n, the logi c value of the comparison volt- age v ref which is generated by the built-in da converter can be obtained by the following formula. logic value of comparison voltage v ref v ref = 5 n n = value of register ad (n = 0 to 255) v dd 256 voltage drop detection circuit characteristics (ta = C20 c to 85 c, unless otherwise noted) test conditions ta = 25 c v dd = 5.0 v parameter detection voltage operation current of voltage drop detection circuit symbol v rst i rst limits unit v m a min. 2.7 3.3 typ. 3.5 50 max. 4.1 3.7 100
91 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. basic timing diagram voltage comparator recommended operating condition (ta = C20 c to 85 c, unless otherwise noted) conditions v dd = 3.0 v to 5.5 v v dd = 3.0 v to 5.5 v parameter supply voltage voltage comparator input voltage voltage comparator response time symbol v dd v incmp t cmp limits unit v v m s min. 3.0 0.3v dd typ. max. 5.5 0.7v dd 20 voltage comparator characteristics (ta = C20 c to 85 c, v dd = 3.0 v to 5.5 v, unless otherwise noted) test conditions cmp0- > cmp0+, cmp0- < cmp0+ cmp1- > cmp1+, cmp1- < cmp1+ v dd = 5.0 v parameter comparison decision voltage error voltage comparator operation current symbol C i cmp limits unit mv m a min. typ. 20 15 max. 100 50 x in system clock = f(x in ) mi mi+1 d 0 ? 7 p0 0 ?0 3 p1 0 ?1 3 p0 0 ?0 3 p1 0 ?1 3 p2 0 ?2 2 d 0 ? 7 p3 0 ?3 3 p4 0 ?4 3 p5 0 ?5 3 p3 0 ?3 3 p4 0 ?4 3 p5 0 ?5 3 int0,int1 machine cycle pin name parameter clock port d output port d input ports p0, p1, p3, p4, p5 output ports p0, p1, p2, p3, p4, p5 input interrupt input x in system clock = f(x in )/2
92 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. table 25 product of built-in prom version product m34513e4sp/fp m34513e8fp m34514e8fp rom type one time prom version [shipped in blank] prom size ( 5 10 bits) 4096 words 8192 words 8192 words ram size ( 5 4 bits) 256 words 384 words 384 words package sp: 32p4b fp: 32p6b-a 32p6b-a 42p2r-a fig. 49 pin configuration of built-in prom version of 4513 group built-in prom version in addition to the mask rom versions, the 4513/4514 group has programmable rom version software compatible with mask rom. the built-in prom of one time prom version can be written to and not be erased. the built-in prom versions have functions similar to those of the mask rom versions, but they have prom mode that enables writ- ing to built-in prom. table 25 shows the product of built-in prom version. figure 49 and 50 show the pin configurations of built-in prom versions. fig. 50 pin configuration of built-in prom version of 4514 group p1 2 p1 1 p1 0 p0 3 p0 2 p0 1 p0 0 a in3 /cmp1+ a in2 /cmp1- a in1 /cmp0+ a in0 /cmp0- p3 1 /int1 p3 0 /int0 vdce v dd m34514e8fp outline 42p2r-a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 p1 3 d 1 d 2 d 3 d 4 d 5 d 6 /cntr0 d 7 /cntr1 p2 1 /s out p2 0 /s ck p2 2 /s in cnv ss x out x in v ss reset p4 3 /a in7 p3 2 p3 3 p4 2 /a in6 p4 1 /a in5 p4 0 /a in4 32 31 30 29 28 27 26 25 24 23 22 33 34 35 36 37 38 39 40 41 42 d 0 p5 0 p5 1 p5 2 p5 3 17 18 19 20 21 m34513e4sp 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 p1 3 p1 2 p1 1 p1 0 p0 3 p0 2 p0 1 p0 0 a in3 /cmp1+ a in2 /cmp1- a in1 /cmp0+ a in0 /cmp0- p3 1 /int1 p3 0 /int0 vdce v dd d 0 d 1 d 2 d 3 d 4 d 5 d 6 /cntr0 d 7 /cntr1 p2 0 /s ck p2 1 /s out p2 2 /s in reset cnv ss x out x in v ss outline 32p4b 9 10 11 12 13 14 15 16 32 31 30 29 28 27 26 25 m34513exfp 24 23 22 21 20 19 18 17 1 2 3 4 5 6 7 8 d 2 d 1 d 0 p1 3 p1 2 p1 1 p1 0 p0 3 reset cnv ss x out x in v ss v dd vdce p3 0 /int0 outline 32p6b-a d 3 d 4 d 5 d 6 /cntr 0 d 7 /cntr 1 p2 0 /s ck p2 1 /s out p2 2 /s in p0 2 p0 1 p0 0 a in3 /cmp1+ a in2 /cmp1- a in1 /cmp0+ a in0 /cmp0- p3 1 /int1
93 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. fig. 52 flow of writing and test of the product shipped in blank fig. 51 prom memory map (1) prom mode the built-in prom version has a prom mode in addition to a nor- mal operation mode. the prom mode is used to write to and read from the built-in prom. in the prom mode, the programming adapter can be used with a general-purpose prom programmer to write to or read from the built-in prom as if it were m5m27c256k. programming adapters are listed in table 26.contact addresses at the end of this sheet for the appropriate prom programmer. ? writing and reading of built-in prom programming voltage is 12.5 v. write the program in the prom of the built-in prom version as shown in figure 51. (2) notes on handling a high-voltage is used for writing. take care that overvoltage is not applied. take care especially at turning on the power. for the one time prom version shipped in blank, mitsubishi electric corp. does not perform prom writing test and screening in the assembly process and following processes. in order to im- prove reliability after writing, performing writing and test according to the flow shown in figure 52 before using is recom- mended (products shipped in blank: prom contents is not written in factory when shipped). table 26 programming adapters microcomputer m34513e4sp m34513e4fp, m34513e8fp m34514e8fp programming adapter pca7442sp pca7442fp pca7441 address 0000 16 1fff 16 4000 16 5fff 16 7fff 16 aaaaaaaa a aaaaaa a aaaaaaaa 1 11 d 4 d 3 d 2 d 1 d 0 high-order 5 bits aaaaaaaa aaaaaaaa 1 11 d 4 d 3 d 2 d 1 d 0 low-order 5 bits set ff 16 to the shaded area. writing with prom programmer screening (leave at 150 ?c for 40 hours) (note) verify test with prom programmer function test in target device since the screening temperature is higher than storage temperature, never expose the microcomputer to 150 ?c exceeding 100 hours. note:
94 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 1. confirmation specify the type of eproms submitted. three sets of eproms are required for each pattern (check in the approximate box). if at least two of the three sets of eproms submitted contain the identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differ from this data. thus, the customer must be especially careful in verifying the data contained in the eproms submitted. microcomputer name: m34513m2-xxxsp M34513M2-XXXFP checksum code for entire eprom area (hexadecimal notation) eprom type: company name date issued date: customer 27c256 27c512 low-order 5-bit data high-order 5-bit data 0000 16 07ff 16 4000 16 47ff 16 7fff 2.00k 2.00k low-order 5-bit data high-order 5-bit data 0000 16 07ff 16 4000 16 47ff 16 ffff 2.00k 2.00k set ff 16 in the shaded area. set 111 2 in the area of low-order and high-order 5-bit data. 2. mark specification mark specification must be submitted using the correct form for the type of package being ordered. fill out the approximate mark specification form (32p4b for m34513m2-xxxsp, 32p6b-a for M34513M2-XXXFP) and attach to the mask rom order confirmation form. 3. comments tel ( ) mask rom number date: section head signature supervisor signature responsible officer supervisor issuance s ignature receipt gzz-sh52-45b <81a0> 4500 series mask rom order confirmation form single-chip microcomputer m34513m2-xxxsp/fp mitsubishi electric please fill in all items marked ] . ] ] ] ]
95 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 1. confirmation specify the type of eproms submitted. three sets of eproms are required for each pattern (check in the approximate box). if at least two of the three sets of eproms submitted contain the identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differ from this data. thus, the customer must be especially careful in verifying the data contained in the eproms submitted. microcomputer name: m34513m4-xxxsp m34513m4-xxxfp checksum code for entire eprom area (hexadecimal notation) eprom type: company name date issued date: customer 27c256 27c512 low-order 5-bit data high-order 5-bit data 0000 16 0fff 16 4000 16 4fff 16 7fff 16 4.00k 4.00k low-order 5-bit data high-order 5-bit data 0000 16 0fff 16 4000 16 4fff 16 ffff 16 4.00k 4.00k set ff 16 in the shaded area. set 111 2 in the area of low-order and high-order 5-bit data. 2. mark specification mark specification must be submitted using the correct form for the type of package being ordered. fill out the approximate mark specification form (32p4b for m34513m4-xxxsp, 32p6b-a for m34513m4-xxxfp) and attach to the mask rom order confirmation form. 3. comments tel ( ) mask rom number date: section head signature supervisor signature responsible officer supervisor issuance s ignature receipt gzz-sh52-44b <81a0> 4500 series mask rom order confirmation form single-chip microcomputer m34513m4-xxxsp/fp mitsubishi electric please fill in all items marked . ] ] ] ] ]
96 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 1. confirmation specify the type of eproms submitted. three sets of eproms are required for each pattern (check in the approximate box). if at least two of the three sets of eproms submitted contain the identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differ from this data. thus, the customer must be especially careful in verifying the data contained in the eproms submitted. checksum code for entire eprom area (hexadecimal notation) eprom type: company name date issued date: customer 27c256 27c512 low-order 5-bit data high-order 5-bit data 0000 16 17ff 16 4000 16 57ff 16 7fff 16 6.00k 6.00k low-order 5-bit data high-order 5-bit data 0000 16 17ff 16 4000 16 57ff 16 ffff 16 6.00k 6.00k set ff 16 in the shaded area. set 111 2 in the area of low-order and high-order 5-bit data. 2. mark specification mark specification must be submitted using the correct form for the type of package being ordered. fill out the approximate mark specification form (32p6b-a for m34513m6-xxxfp) and attach to the mask rom order confirmation form. 3. comments tel ( ) mask rom number date: section head signature supervisor signature responsible officer supervisor issuance s ignature receipt gzz-sh53-01b <85a0> 4500 series mask rom order confirmation form single-chip microcomputer m34513m6-xxxfp mitsubishi electric please fill in all items marked . ] ] ] ] ]
97 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 1. confirmation specify the type of eproms submitted. three sets of eproms are required for each pattern (check in the approximate box). if at least two of the three sets of eproms submitted contain the identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differ from this data. thus, the customer must be especially careful in verifying the data contained in the eproms submitted. checksum code for entire eprom area (hexadecimal notation) eprom type: company name date issued date: customer 27c256 27c512 low-order 5-bit data high-order 5-bit data 0000 16 1fff 16 4000 16 5fff 16 7fff 16 8.00k 8.00k low-order 5-bit data high-order 5-bit data 0000 16 1fff 16 4000 16 5fff 16 ffff 16 8.00k 8.00k set ?f 16 ?in the shaded area. set ?11 2 ?in the area of low-order and high-order 5-bit data. 2. mark specification mark specification must be submitted using the correct form for the type of package being ordered. fill out the approximate mark specification form (32p6b-a for m34513m8-xxxfp) and attach to the mask rom order confirmation form. 3. comments tel ( ) mask rom number date: section head signature supervisor signature responsible officer supervisor issuance s ignature receipt gzz-sh52-99b <85a0> 4500 series mask rom order confirmation form single-chip microcomputer m34513m8-xxxfp mitsubishi electric please fill in all items marked . ] ] ] ] ]
98 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 1. confirmation specify the type of eproms submitted. three sets of eproms are required for each pattern (check in the approximate box). if at least two of the three sets of eproms submitted contain the identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differ from this data. thus, the customer must be especially careful in verifying the data contained in the eproms submitted. checksum code for entire eprom area (hexadecimal notation) eprom type: company name date issued date: customer 27c256 27c512 low-order 5-bit data high-order 5-bit data 0000 16 17ff 16 4000 16 57ff 16 7fff 16 6.00k 6.00k low-order 5-bit data high-order 5-bit data 0000 16 17ff 16 4000 16 57ff 16 ffff 16 6.00k 6.00k set ff 16 in the shaded area. set 111 2 in the area of low-order and high-order 5-bit data. 2. mark specification mark specification must be submitted using the correct form for the type of package being ordered. fill out the approximate mark specification form (42p2r-a for m34514m6-xxxfp) and attach to the mask rom order confirmation form. 3. comments tel ( ) mask rom number date: section head signature supervisor signature responsible officer supervisor issuance s ignature receipt gzz-sh52-41b <81a0> 4500 series mask rom order confirmation form single-chip microcomputer m34514m6-xxxfp mitsubishi electric please fill in all items marked . ] ] ] ] ]
99 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 1. confirmation specify the type of eproms submitted. three sets of eproms are required for each pattern (check in the approximate box). if at least two of the three sets of eproms submitted contain the identical data, we will produce masks based on this data. we shall assume the responsibility for errors only if the mask rom data on the products we produce differ from this data. thus, the customer must be especially careful in verifying the data contained in the eproms submitted. checksum code for entire eprom area (hexadecimal notation) eprom type: company name date issued date: customer 27c256 27c512 low-order 5-bit data high-order 5-bit data 0000 16 1fff 16 4000 16 5fff 16 7fff 16 8.00k 8.00k low-order 5-bit data high-order 5-bit data 0000 16 1fff 16 4000 16 5fff 16 ffff 16 8.00k 8.00k set ?f 16 ?in the shaded area. set ?11 2 ?in the area of low-order and high-order 5-bit data. 2. mark specification mark specification must be submitted using the correct form for the type of package being ordered. fill out the approximate mark specification form (42p2r-a for m34514m8-xxxfp) and attach to the mask rom order confirmation form. 3. comments tel ( ) mask rom number date: section head signature supervisor signature responsible officer supervisor issuance s ignature receipt gzz-sh52-40b <81a0> 4500 series mask rom order confirmation form single-chip microcomputer m34514m8-xxxfp mitsubishi electric please fill in all items marked . ] ] ] ] ]
100 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 32p4b (32-pin shrink dip) mark specification form mitsubishi ic catalog name please choose one of the marking types below (a, b, c), and enter the mitsubishi ic catalog name and the special mark (if neede d). a. standard mitsubishi mark note1 : if the special mark is to be printed, indicate the desired layout of the mark in the upper figure. the layout will be dup licated as close as possible. mitsubishi lot number (6-digit or 7-digit) and mask rom number (3-digit) are always marked. 2 : if the customers trade mark logo must be used in the special mark, check the box on the right. please submit a clean original of the logo. for the new special character fonts a clean font original (ideally logo drawing) must be submitted. 3 : the standard mitsubishi font is used for all characters except for a logo. special logo required mitsubishi ic catalog name c. special mark required b. customers parts number + mitsubishi catalog name customers parts number note : the fonts and size of characters are standard mitsubishi type. mitsubishi ic catalog name note1 : the mark field should be written right aligned. 2 : the fonts and size of characters are standard mitsubishi type. 3 : customers parts number can be up to 16 characters : only 0 ~ 9, a ~ z, +, C, /, (, ), &, ? , . (periods), and , (commas) are usable. 4 : if the mitsubishi logo is not required, check the box on the right. mitsubishi logo is not required mitsubishi lot number (6-digit or 7-digit) 32 1 16 17 mitsubishi lot number (6-digit or 7-digit) 32 1 16 17 32 1 16 17
101 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 32p6b (32-pin lqfp) mark specification form mitsubishi ic catalog name please choose one of the marking types below (a, b), and enter the mitsubishi catalog name and the special mark (if needed). a. standard mitsubishi mark b. customers parts number + mitsubishi catalog name mitsubishi ic catalog name mitsubishi ic catalog name customers parts number note : the fonts and size of characters are standard mitsubishi type. mitsubishi ic catalog name note1 : the mark field should be written right aligned. 2 : the fonts and size of characters are standard mitsubishi type. 3 : customers parts number can be up to 7 characters : only 0 ~ 9, a ~ z, +, C, /, (, ), &, ? , . (periods), , (commas) are usable. 1 32 8 9 16 25 17 24 mitsubishi lot number (4-digit or 5-digit) 1 32 8 9 16 25 17 24
102 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. 42p2r-a (42-pin shrink sop) mark specification form mitsubishi ic catalog name please choose one of the marking types below (a, b, c), and enter the mitsubishi catalog name and the special mark (if needed). a. standard mitsubishi mark c. special mark required b. customers parts number + mitsubishi catalog name mitsubishi ic catalog name mitsubishi ic catalog name note1 : if the special mark is to be printed, indicate the desired layout of the mark in the left figure. the layout will be duplicated as close as possible. mitsubishi lot number (6-digit or 7-digit) and mask rom number (3-digit) are always marked. 2 : if the customers trade mark logo must be used in the special mark, check the box below. please submit a clean original of the logo. for the new special character fonts a clean font original (ideally logo drawing) must be submitted. special logo required customers parts number note : the fonts and size of characters are standard mitsubishi type. mitsubishi ic catalog name note1 : the mark field should be written right aligned. 2 : the fonts and size of characters are standard mitsubishi type. 3 : customers parts number can be up to 11 characters : only 0 ~ 9, a ~ z, +, C, /, (, ), &, ? , . (periods), , (commas) are usable. 4 : if the mitsubishi logo is not required, check the box below. mitsubishi logo is not required 1 21 22 42 mitsubishi lot number (6-digit or 7-digit) 1 21 22 42 mitsubishi lot number (6-digit or 7-digit) 1 21 22 42
103 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. package outline sdip32-p-400-1.78 weight(g) 2.2 jedec code eiaj package code lead material alloy 42/cu alloy 32p4b plastic 32pin 400mil sdip symbol min nom max a a 2 b b 1 b 2 c e d l dimension in millimeters a 1 0.51 ?.8 0.35 0.45 0.55 0.9 1.0 1.3 0.63 0.73 1.03 0.22 0.27 0.34 27.8 28.0 28.2 8.75 8.9 9.05 1.778 10.16 3.0 0 ?5 5.08 e e 1 32 17 16 1 e c e 1 a 2 a 1 b 2 b b 1 e la seating plane d lqfp32-p-77-0.80 weight(g) jedec code eiaj package code lead material alloy 42 32p6b-a plastic 32pin 7 5 7mm body lqfp 0.1 0.2 symbol min nom max a a 2 b c d e h e l l 1 y b 2 dimension in millimeters h d a 1 0.5 i 2 1.0 m d 7.4 m e 7.4 10 0 0.1 1.0 0.7 0.5 0.3 9.2 9.0 8.8 9.2 9.0 8.8 0.8 7.1 7.0 6.9 7.1 7.0 6.9 0.175 0.125 0.105 0.45 0.35 0.3 1.4 0 1.7 e e e e c h e 1 8 9 32 25 24 16 17 h d d m d m e a f b a 1 a 2 l 1 l y b 2 i 2 recommended mount pad detail f
104 4513/4514 group single-chip 4-bit cmos microcomputer mitsubishi microcomputers preliminary notice: this is not a final specification. some parametric limits are subject to change. ssop42-p-450-0.80 weight(g) jedec code 0.63 eiaj package code lead material alloy 42/cu alloy 42p2r-a plastic 42pin 450mil ssop symbol min nom max a a 2 b c d e l l 1 y dimension in millimeters h e a 1 i 2 .35 0 .05 0 .13 0 .3 17 .2 8 .63 11 .3 0 .27 1 .0 2 .4 0 .15 0 .5 17 .4 8 .8 0 .93 11 .5 0 .765 1 .43 11 .4 2 .5 0 .2 0 .7 17 .6 8 .23 12 .7 0 .15 0 b 2 ?5 0 0 ?0 e e 1 42 22 21 1 h e e d b e y f a a 2 a 1 l 1 l c e b 2 e 1 i 2 recommended mount pad detail f
? 1998 mitsubishi electric corp. new publication, effective aug. 1998. specifications subject to change without notice. notes regarding these materials ? these materials are intended as a reference to assist our customers in the selection of the mitsubishi semiconductor product b est suited to the customers application; they do not convey any license under any intellectual property rights, or any other rights, belonging to mitsubishi electric corporation or a third party. ? mitsubishi electric corporation assumes no responsibility for any damage, or infringement of any third-partys rights, origina ting in the use of any product data, diagrams, charts or circuit application examples contained in these materials. ? all information contained in these materials, including product data, diagrams and charts, represent information on products a t the time of publication of these materials, and are subject to change by mitsubishi electric corporation without notice due to product improvements or other reasons. it is therefore recommended that customers co ntact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for the latest product information before purchasing a product listed herein. ? mitsubishi electric corporation semiconductors are not designed or manufactured for use in a device or system that is used und er circumstances in which human life is potentially at stake. please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor when considering the use of a pro duct contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. ? the prior written approval of mitsubishi electric corporation is necessary to reprint or reproduce in whole or in part these m aterials. ? if these products or technologies are subject to the japanese export control restrictions, they must be exported under a licen se from the japanese government and cannot be imported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/or the country of destination is pro hibited. ? please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for further detai ls on these materials or the products contained therein. keep safety first in your circuit designs! ? mitsubishi electric corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making y our circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any malfunction or mishap.
rev. rev. no. date 1.0 first edition 980807 revision description list 4513/4514 group data sheet (1/1) revision description


▲Up To Search▲   

 
Price & Availability of M34513M2-XXXFP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X